programming:php

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);
<input name="form" type="submit" value="Name"/>
  • programming/php.txt
  • Last modified: 2021/06/17 22:18
  • by mh