In message <[EMAIL PROTECTED]>,
Gregory Fox <[EMAIL PROTECTED]> writes
>Pete,
> 
>Thanks for the reply.
> 
>However, if I do this, which is putting it with a loop:
> 
>while(list($key, $value) = each($arr = $db->Fetch_array($sql))){
>    echo $key." => ". $value. "<br>"; 
>}
>I get this error:

You are getting your arrays in a twist (;->

while(list($key, $value)=$db->Fetch_array($sql)){
   echo $key." => ". $value. "<br>"; 


I would 
echo "$key => $value<BR>"
or
echo $key.' => '. $value. '<br>'; 
...both of which will be a squillisecond quicker, since the double
quotes in your version cause PHP to parse " => " to see if there are any
variables to be 'translated to values'

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h6l3fvi/M=362329.6886308.7839368.1510227/D=groups/S=1705375618:TM/Y=YAHOO/EXP=1124488882/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to