+ 1

can you help me fix this simple loop code

<?php $names = array("David", "Amy", "John"); echo $names[1]; for ($a=0;$a<3;$a++) { echo $names[a];} ?>

19th Jan 2018, 8:07 AM
Bkyaro
Bkyaro - avatar
2 Answers
+ 6
<?php $names = array("David", "Amy", "John"); echo $names[1]; for ($a=0;$a<3;$a++) { echo $names[$a];} ?>
19th Jan 2018, 8:09 AM
Md. Nafis Ul Haque Shifat
Md. Nafis Ul Haque Shifat - avatar
+ 2
can you help me fix this simple loop code <?php $names = array("David", "Amy", "John"); echo $names[1]; for ($a=0;$a<3;$a++) { echo $names[a]; // out of scoap } ?>
23rd Jan 2018, 11:27 AM
khateeb ur rahman
khateeb ur rahman - avatar