programming:php

This is an old revision of the document!


PHP

Display an array with a for loop :

$array = array();
foreach ($array as $key => $value) {
 echo $key." => ".$value."<br>";
}

Alternately you can display an array on one line using the method :

$array = array();
print_r($array);
  • programming/php.1591022143.txt.gz
  • Last modified: 2020/06/01 16:35
  • by 127.0.0.1