I can't understand what's going wrong when I call this script;
function move($direction)
{
if (in_array($direction, $position["exits"]))
{
$position = $position["exits[$direction]"];
echo $position["enterdescription"];
}
else
{
echo "<P>You can't go that way from here.</P>";
}
}
I get the error "
Warning: in_array(): Wrong datatype for second argument in /home/content/D/a/r/DarienShields/html/test/map.php on line 9"
It's called as "move("NORTH")" and $position should have been set to this array;
$lobby = array("name" => "lobby", "lookdescription" => "<P>You are in the lobby of a mansion. You can go North (N), East (E), South (S), or West (W)</P>", "enterdescription" => "<P>You return to the lobby</P>", "exits" => array("NORTH" => $north, "EAST" => $east, "SOUTH" => $east, "WEST" => $west));
Any help would be much appreciated, I'm already extremely thankful for all I've been told.