Answers for "php loop through array of strings"

PHP
4

how to iterate through php array

$ar = ['Rudi', 'Morie', 'Halo', 'Miki'];

for ($i=0, $len=count($ar); $i<$len; $i++) {
    echo "$ar[$i] \n";
}
/*
Rudi 
Morie 
Halo 
Miki 
*/
Posted by: Guest on January-16-2020

Code answers related to "php loop through array of strings"

Browse Popular Code Answers by Language