Jump to content

dadragon84

New Members
  • Posts

    3
  • Joined

  • Last visited

dadragon84's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok I changed the top 5 drivers and the $linedown is set somewhere else above but its still not applying a new line how do I set $linedown to add a new number for each loop this is the variable that is set curently $linedown = 15;
  2. I am trying to add a new line within a foreach loop using imagestring, but it keeps showing the information on the same line Here is the image and you can see the mistake I dont need to point it out Image Link <?php if (count($rows) == 0) { imagestring($image, $fontsize, $leftside, 90, "NO JOBS DETECTED", $font_white); } foreach($rows as $key=>$row) { $query = " SELECT username FROM users"; $query_params = array(':id' => $row['driver']); $query .= "WHERE id = :id"; try { $stmt = $db->prepare($query); $result = $stmt->execute($query_params); } catch(PDOException $ex) { die("Failed to run query: " . $ex->getMessage()); } $driver = $stmt->fetch(); $driver = $driver['username']; imagestring($image, $fontsize, $leftside, 100, "Top 5 Drivers", $font_red); imagestring($image, $fontsize, $leftside, $linedown, ($key+1).'..' . $driver, $font_red); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.