Advertisement
Guest User

Untitled

a guest
Sep 13th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. include_once 'connect.php';
  2.  
  3. $player_id = '6';
  4.  
  5. $result_value = array();
  6.  
  7. for ($ix = 1; $ix <= 16; $ix++) {
  8. $result_value[$ix] = array();
  9. for ($iy = 1; $iy <= 16; $iy++) {
  10. $result_value[$ix][$iy] = array();
  11. }
  12. }
  13.  
  14. $pullMapInfo = "SELECT x, y, z, value FROM mapinfo WHERE id='{$player_id}'";
  15. $pullMapInfo2 = mysql_query($pullMapInfo) or die(mysql_error());
  16. $pullMapInfo3 = mysql_fetch_assoc($pullMapInfo2);
  17. $x = $pullMapInfo3["x"];
  18. $y = $pullMapInfo3["y"];
  19. $z = $pullMapInfo3["z"];
  20.  
  21. $result_value[$x][$y][$z] = $pullMapInfo3["value"];
  22.  
  23. for($iz = 1; $iz <= 3; $iz++){
  24.     echo 'Layer ', $iz, '<br>';
  25. for($ix = 1; $ix <= 16; $ix++){
  26. for($iy = 1; $iy <= 16; $iy++){
  27.     $result_value[$x][$y][$z] = $pullMapInfo3["value"];
  28.     echo '<br>';
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement