I would recommend defining a two-dimensional [man]array[/man].
// create 2 x 2 array matrix called $map:
$map = array();
for($x=0; $x<10; $x++) {
// create row $x -- a nested array!
$map[$x] = array();
for($y=0; $y<10; $y++) {
// within row $x, create an associative array to describe the contents of each point on this row
$map[$x][$y ] = array(
'clue' => NULL;
'treasure' => NULL;
'monster' => NULL;
);
}
}
//Then you can assign clues, treasures, and monsters to coordinate x=2, y=3 on the map like so
$map[2][3]['clue'] = "You find a glowing sword! Watch out for monsters nearby!";
$map[2][3]['treasure'] = "DRAGON_SLAYING_SWORD";
$map[2][3]['monster'] = NULL; // no monster
// then assign a the next coordinate over
$map[3][3]['clue'] = "OH **** A DRAGON!";
$map[3][3]['treasure'] = "100 gold pieces";
$map[3][3]['monster'] = "Red Dragon, 100HP, 10D10 DAMAGE";
I've just assigned simple strings for clues, etc. in this case, but in reality you would probably use more complex objects.
The other logic is up to you.