This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 13th, 2012  |  syntax: PHP  |  size: 0.75 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data