foreach

PHP4 foreach, :

foreach (array as [$key =>] $value)
{
   statements;
}

: $key , $value . .

:

<?php
   $car = array("passenger car", "land-rover",
      "station-wagon","victoria");
   foreach($car as $index => $val)
   {
      echo("$index -> $val <br>");
   }
?>

, $key :

<?php
   echo(
      "available cars: <br> <ul>"
   );
   $car = array("passenger car", "land-rover",
      "station-wagon","victoria");
   foreach($car as $val)
   {
      echo("<li>$val</li>\n");
   }
   echo("</ul>");
?>

, " " ( , !), , . FAQ .


 03.12.2019 - 22:04: , , - Upbringing, Inlightening, Education -> - _.
03.12.2019 - 11:12: , , - Upbringing, Inlightening, Education -> .. - _.
30.11.2019 - 19:55: - Theorizing and Mathematical Design -> - - _.
30.11.2019 - 18:13: - Conscience -> - _.
29.11.2019 - 08:14: , , - Upbringing, Inlightening, Education -> - _.
27.11.2019 - 08:31: , , - Upbringing, Inlightening, Education -> - - _.
27.11.2019 - 08:30: , - War, Politics and Science -> - _.
27.11.2019 - 08:27: - New Technologies -> - _.
23.11.2019 - 12:17: - Ecology -> - _.
19.11.2019 - 09:07: , , - Upbringing, Inlightening, Education -> - _.
18.11.2019 - 19:10: , - War, Politics and Science -> - _.
Bourabai Research Institution home page

Bourabai Research -  XXI Bourabai Research Institution