reapeating results help

Discussion in 'PHP' started by Funk-woo10, Apr 8, 2008.

  1. #1
    Hi all,

    When I use this code it outputs exactly ehat I want, however i need it to repeat the task 6 different times each time printing a different result in DESC order. - Do i need to use a loop ?

    
    $row = mysql_fetch_array($result, MYSQL_ASSOC);
    extract($row);
    
    ?>
    
    <br />
    <?php print "$m_user"; ?>
    
    
    PHP:

    ANy help is goood thanks.
     
    Funk-woo10, Apr 8, 2008 IP
  2. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #2
    
    while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
    extract($row);
    
    ?>
    
    <br />
    <?php print "$m_user"; }
    ?>
    PHP:
    But if you want a DESC order you should set in in sql query.
     
    AsHinE, Apr 8, 2008 IP