Take the 2-minute tour ×  This is my data  id          cost
cat         foreign     colours 385_white   99      swarovski
12          black;blue 386_white   99      swarovski   12
black;blue;green 387_white   99      swarovski   12
yellow;green 389_white   99      swarovski   12
white;silver 385_white   99      swarovski   12          silver
This is my query  $checkSQL=mysql_query("SELECT * FROM
`products`"); while($r = mysql_fetch_array($checkSQL)) {
echo '         <ul class="ColourList">             <li
class="$row">$row</li>  Pseudo code - this should split the list
into unique li  foreach ($r["colours"] as $key){
$key = explode(";", $r["colours"]);                         <li
class="$key"></li>  I want to create a list li item for each
colour in the table row, so basically split the colon into
separate rows - think it is explode?  share|improve this
question You could always try it and see. –  andrewsi Oct 1 '12
at 15:50 Your while loop isn't go