Hi all
I create a individual php file call bag.php
inside have an array
<?php
$bag = array(
array($name=“hata”,$sex=“male”,$hobby=“reading”),
array($name=“toshi”,$sex=“male”,$hobby=“cycling”),
array($name=“kimura”,$sex=“male”,$hobby=“surfing”));
?>
I make another php call load.php
inside
<?php
include(“bag.php”);
$bag1 = $bag[0];
foreach($bag1 as $key=> $val){
print “$$key = “$val”<br />;”;
}
?>
my name is <?php $name; ?>
its gave an error
“Notice: Undefined variable: name in c:\inetpub\wwwroot emp est.php on line 11”
how to make it to display the $name correctly
or how do i need to modified the code