在PHP中删除"数组([] =>"

时间:2017-11-17 19:27:12

标签: php

所以我有这个PHP脚本从数据库中获取随机引号。这样做很好,但结果打印如下:

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. ) 

多丑啊!如何删除Array ( [quote] =>并打印字符串?

我的PHP代码:

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

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

while($row = mysqli_fetch_assoc($result))
{
    print_r($row);
}

0 个答案:

没有答案