0

So I have this PHP script that fetches random quotes from a database. That works all fine, however, the result is printed like this:

Array ( [quote] => I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests. ) 

How ugly! How do I remove the Array ( [quote] => and just print the string?

My PHP code:

$sql = "SELECT `quote` FROM `qutoes` ORDER BY RAND() LIMIT 1 ";

$result = mysqli_query($db, $sql);

while($row = mysqli_fetch_assoc($result))
{
    print_r($row);
}
emshore
  • 489
  • 6
  • 15
Freeman
  • 159
  • 1
  • 8

0 Answers0