Reverse the Order of Elements in Array using PHP

array_reverse function

<?php

$data = [10, 3, 17, 50, 15];
$data = array_reverse($data);

print_r($data);

Leave a Comment

Cancel reply

Your email address will not be published.