Answers for "for every array element php"

PHP
5

php foreach echo key value

foreach($page as $key => $value) {
  echo "$key is at $value";
}
Posted by: Guest on September-04-2020
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 "for every array element php"

Browse Popular Code Answers by Language