Advertisement
mbeersnl

Map groot

Aug 4th, 2014
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2. set_time_limit(10800);
  3. $map_width = 40;
  4. $map_height = 40;
  5.  
  6. for($y = $map_height; $y >= 1; $y--) {
  7.     for($x = 1;$x <= $map_width;$x++) {
  8.         require_once('includes/db/DbConnector.php');
  9.         $connector = new DbConnector();
  10.         $result = $connector->query('SELECT * FROM map WHERE x = "'.$x.'" AND y = "'.$y.'" ');
  11.        
  12.         while($row = $connector->fetchArray($result)) {
  13.             echo '<img src="images/map/lan_'.$row['tip'].$row['subtip'].'.gif" title="('.$row['x'].'|'.$row['y'].')" style="float: left;margin: 0;padding:0;">';
  14.         }
  15.     }
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement