I have a database that is going to contain quotes. I want these quotes to be displayed randomly. However with what I have now, it's only showing one letter at a time. Is there a way to convert an integer to a string so that the whole word may be converted? Or if there is a better way, please let me know. Thanks for any help you can provide! 🙂
<?php
$get = mysql_query("SELECT * FROM quotes") or die(mysql_error());
$row = mysql_fetch_array($get);
$quotes = $row['quotes'];
$quotes = settype($quotes, "string");
$randquote = rand(1, 10);
echo($quotes[$randquote]);
?>