Custom Increment by given array in php -
i have array
array ( [0] => f [1] => f [2] => n [3] => )
how run 2 loops above array ?
for ($x = 0; $x <= 2; $x++) { //in loop need output above f-01 f-02 }
i have loop im fetching data in like
for ($x = 0; $x <= 1; $x++) { //in loop need output above n-01 }
for on need below
<?php $myarray = array ( 'f' ,'f' ,'n' , 'l'); $j =0; for($x = 0; $x < 2; $x++ ){ echo $myarray[$x].'-'.$j.$x; echo "<br>"; } echo "<br>"; $m=0; for($k=2;$k<=3;$k++){ echo $myarray[$k].'-'.$j.$m; echo "<br>"; } ?>
i hope you.
Comments
Post a Comment