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.1540567677.txt.gz
  • Last modified: 2020/06/01 16:36
  • (external edit)