how to reverse array values without using array_reverse in php.
Please can anyone reply for this
thanks in advance
Punithapary
how to reverse array values without using array_reverse in php.
Please can anyone reply for this
thanks in advance
Punithapary
$data=array(1,2,3,4,5,6);
$rev=array();
$i=count($data);
$x=0
for( $j=$i-1; $j>-1; $j--){
$rev[$x]=$data[$j];
$x++;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.