Hello i try to ad a white space but i cant figure it out. I want to ad a space between AllCars like that All Cars and when i ad space you see this, Warning: Invalid argument supplied for foreach() in /domain/domain/domain/domaincom on line 11 <?php include 'connect.php'; $result = mysql_query("select (select count(1) FROM videos WHERE title LIKE '%Funny%') as Funny, (select count(1) FROM videos WHERE title LIKE '%Bikes%') as Bikes, (select count(1) FROM videos WHERE title LIKE '%Cars%') as AlCars"); <------- $row = mysql_fetch_assoc($result); foreach($row as $title => $total) { echo '<div class="textbl">' . $title . ': ' . $total .'</div>'; } ?> PHP: Thanks.
Try this way $result = mysql_query("select (select count(1) FROM videos WHERE title LIKE '%Funny%') as Funny, (select count(1) FROM videos WHERE title LIKE '%Bikes%') as Bikes, (select count(1) FROM videos WHERE title LIKE '%Cars%') as 'All Cars'"); PHP: