PDA

View Full Version : Turn blob of text with commas into <li></li>



mtran
12-18-2007, 02:33 PM
In mysql db, I have a blob of text/string with commas separating different items like: car, muscle XXXXX bike, motocycle, 1234 abcd xfhsdah boat

Is there a way to display this blob of text nicely into <li>car</li>, <li>muscle XXXXX bike</li>... considering the real list is much longer and every record of the db has this text of blob with different content.

Thanks for the input!

boogyman
12-18-2007, 02:46 PM
$desc = emplode(',',$source);
echo "<ul>";
foreach($desc as $d)
{
echo "\n\t<li>". $d ."</li>";
}
echo "</ul>";