Tuesday, 20 March 2012

for each

<html>
<body>
<?php
$arr=array("one", "two", "three");
foreach ($arr as $value)
{
  echo "Value: " . $value . "<br />";
}
?>
</body>
</html>

output
Value: one
Value: two
Value: three

No comments:

Post a Comment