Hello All:
Can someone gives me a poniter on why I am getting:
Warning: Invalid argument supplied for foreach() in emp_array.php on line 20
Thanks for your patient and help
Can someone gives me a poniter on why I am getting:
Warning: Invalid argument supplied for foreach() in emp_array.php on line 20
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title> Employee Array </title>
</head>
<body>
<form action="emp_array.php" method="post">
$employees = array("Ann Jones", "John Smith", "Barny Ruble", "Fred Flintstone", "Pebbles Flintstone", "Betty Rubble");
</form>
<?php
foreach ( $employees as $employee ) {
print $employee . "<br />";
}
?>
</body>
</html>
Thanks for your patient and help