I am getting the error Fatal error: Call to undefined function aary() in C:\wamp\www\MultiDimensionalArray.php on line 57
Can someone show me what is wrong with my code and maybe correct it thanks I will add to reputation of first correct answer (That I understand of course lol). Also if testing code please remember to delete the "57" in the begining of the line as I do not have that in my code I simply added that to show line 57 to you for potential help with error.
Can someone show me what is wrong with my code and maybe correct it thanks I will add to reputation of first correct answer (That I understand of course lol). Also if testing code please remember to delete the "57" in the begining of the line as I do not have that in my code I simply added that to show line 57 to you for potential help with error.
<?php echo"<html>\n"; echo"<head>\n"; echo"<title>Multi Demensional Array</title>\n"; echo"<head>\n"; echo"<body>"; echo"<h1>Array Example</h1>\n"; echo"<hr>"; echo"<br>"; $a1 = array( "fName" => "Michael", "lName" => "Scott", "profession" => "World's Best Boss", "bd" => "8/16/1969", "aka" => "Steve Carell" ); $a2 = array( "fName" => "Pam", "lName" => "Beesly", "profession" => "Receptionist", "bd" => "3/7/1978", "aka" => "Jenna Fischer" ); $a3 = array( "fName" => "Jim", "lName" => "Halpert", "profession" => "Salesman", "bd" => "10/20/1979", "aka" => "John Krasinski" ); $a4 = array( "fName" => "Dwight", "lName" => "Schrute", "profession" => "Assistant to the Regional Manager", "bd" => "1/20/1972", "aka" => "Rainn Wilson" ); $a5 = array( "fName" => "Meredith", "lName" => "Palmer", "profession" => "Customer Relations Representative", "bd" => "4/19/1954", "aka" => "Kate Flannery" ); $a6 = array( "fName" => "Ryan", "lName" => "doe", "profession" => "computer programer", "bd" => "8/30/1954", "aka" => "Rabbit" ); 57 $aryValues=aary($a1,$a2,$a3,$a4,$a5,$a6); foreach ($aryValues as $value) { foreach ($value as $k=>$v){ switch($k){ case "fname"; $k="First Name:"; break; case "lName": $k="Last Name:"; break; case "proffesion"; $k="proffesion:"; break; case "bd"; $k="Birthday:"; break; case "aka"; $k="AKA:"; break; } echo" <strong>".$k."</strong> ".$v."<br>\n";; } echo" <br>\n"; } echo" </body>\n"; echo" </html>\n"; ?>