Re: echo?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok - here's the code in question.
$q = 'select * from director_records ';
$qrslt = mysql_query($q);
$rows = mysql_num_rows($qrslt);
for ($i=0; $i<$rows; $i++)
    {
    $j = $i+1;
    $row = mysql_fetch_array($qrslt);
    echo $j.'-'.$row['userid'];
    if ($row['user_priv']<> "")
        echo ' ('.$row['user_priv'].')&#13&#10';
    else
        echo '&#13&#10';
    }


The output I get is:


1-smith5
f-ginerjm (M)
g-smith8

While the alpha parts are valid, the index is only correct for the first one 
(0) obviously.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux