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 http://seahaventrucking.com/driverstats2.php
Here is my code
[php]<?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);
}[/php]