Loading Rows

I would like all of my rows to load into one line separated by commas. Right now my php loads each one on a new line. [php]while($row = mysqli_fetch_array($result2))
{
$material = $row[‘material’];
echo “

  • $material
  • ”;
    }[/php]

    You musn’t write “

  • ” and “
  • ” inside the while, in each loop you only must write a ‘,’. In the code, i use a var ‘first’ to don’t write ‘,’ in the first loop.

    [php]
    echo"

  • ";
    $fist =true;
    while($row = mysqli_fetch_array($result2)){
    if(!first){
    echo","
    }
    $first=false;
    echo $row[‘material’];

    }
    echo"

  • ";
    [/php]

    Well I would say, use CSS’s inline to bring all the li elements on one line

    Sponsor our Newsletter | Privacy Policy | Terms of Service