# [web] Dynamic Map Help

## Recommended Posts

I'm trying to display a small 9 x 9 map here. The script sends a query, grabs any rows that are 4 + / - of the user's x and y coordinates. It then displays a map, and uses the coordinates to accurately place the users found onto the map. Here's the need-to-know part of my database table setup: kow_user_tbl ------------------------ intX, intY, username, gold, level, race, fortification_type There is only one row inside this table for testing purposes: intX = 1, intY = 1, username = Admin, gold = 4000, level= 1, race = Human, fortification_type = woodenencampment Here is a slightly edited version of the script (read the comments to understand the script, it is heavily commented):
Quote:

##### Share on other sites
I tried print_r.

Here's the output (with some line breaks)

Quote:
 Array ([1] => Array ( [x] => 1 [y] => 1 [username] => Admin [gold] => 4500 [level] => 1 [race] => Human [fortification_type] => woodenencampment))

Everything looks good.

And the game is nearly done, this is the second to last thing I need to finish. I'll PM you a link to the game once it is finished. :)

##### Share on other sites
I woke up this morning, and not a second later than when I woke up the answer to the problem suddenly came to me, and I wasn't even thinking about the code at the time, lol.

It's a silly mistake

Change $user =$players[$i]['username']; to$user = $players[$a]['username'];

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627657
• Total Posts
2978466

• 10
• 12
• 22
• 13
• 33