$loopsize = mysql_num_rows(); $anagram = ""; for ($i = 0; $i < $loopsize; $i++) { $cell = mysql_result($anagram_result, $i, "anagram"); $anagram .= "<b>" . $cell{0} . "</b>" . substr($cell, 1) . "<br />\n"; } On Mon, Sep 1, 2008 at 2:09 AM, Ron Piggott <ron.php@xxxxxxxxxxxxxxxxxx> wrote: > I have the following saved in one column of a mySQL table: > > Like > Overcome > Vested > Embrace > > It is an anagram for the word Love > > I am querying the table to display the results. I am needing help with > the formatting part of this. > > I have this line of code: > > $anagram=mysql_result($anagram_result,$i,"anagram"); > > > I need help adding <br>'s so each word will be on a new line. Within > the table column each word is on a separate line. It would also be > really cool if the first letter was in bold (ie <b>X</b> ) > > echo stripslashes($anagram) > > Thanks, > > Ron > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php