Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End display 3 results

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34509
    The-Marshal
    Member

    Hi all

    i need to display 3 results then line, like :


    $SQL = mysql_query("SELECT * FROM tbl") or die (mysql_error());

    while ($row = mysql_fetch_assoc($SQL)) {
    $id = $row;
    $name = $row;
    $img = $row;

    echo $name."$nbsp;".$img;

    // here i need to display 3 images then display nice image line
    }
    ?>

    I appreciate any help ..

    #88123
    The-Marshal
    Member

    thanx all i found this and works with me


    $i = 0;
    while($row = mysql_fetch_assoc($rs)){
    if($i % 3 == 0){
    echo "
    "
    }

    echo $row . " - " . $row . " - " . $row . "
    ";

    $i++;
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.