[PHP] Re: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user

Hello,
First, Thank you all for your help!
I  finally found the reason for why does  the IE always show info as below:
"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]"

It is because the echo (including print) doesn't work at the line
below,
echo "";
showing the error info as I mentioned. ( but it should work according to PHP
books)

It only works when  the $arr['user_id'] is out of the quotes.
echo "";
then IE showed no error any longer.

So I have to let all $arr['key']  out of the quotes, then the scripts are
Ok.

Regards
Mike















-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user

Hello,
First, Thank you all for your help!
I  finally found the reason for why does  the IE always show info as below:
"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]"

It is because the echo (including print) doesn't work at the line below,
echo "";
showing the error info as I mentioned. ( but it should work according to PHP
books)

It only works when  the $arr['user_id'] is out of the quotes.
echo "";
then IE showed no error any longer.

So I have to let all $arr['key']  out of the quotes, then the scripts are
Ok.

Regards
Mike

















-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mysql_fetch_array() doesn't work

2001-09-25 Thread Pedja


array mysql_fetch_row (resource result)

MySql_fetch_array returns an array that corresponds to the fetched row, or
FALSE if there are no more rows. So put MySql_fetch_array in FOR loop. Look
like this:
for ($count = 1; $row = mysql_fetch_row ($query_result_handle); ++$count)
{
...
}

...the same thing with WHILE:
a)
while ($row = mysql_fetch_row ($query_result_handle))
{ 
... 
} 
b)
while (list($first, $second) = mysql_fetch_row($resource)) { 
[...] 
}


"Web User" <[EMAIL PROTECTED]> wrote in message 
008601c1459e$5f853800$6a915fd3@hexiao">news:008601c1459e$5f853800$6a915fd3@hexiao...
> System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98
> 
> 
>  ..
> ..
> $res=mysql_query($query);
> $num=mysql_num_rows($res);
> for($i=0; $i<$num; $i++){
> $arr=mysql_fetch_array($res);
> ...
> }
> ...
> 
> When PHP is running at the line: $arr=mysql_fetch_array($res);
> The IE always show info as below:
> "Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING' in
> c:\program files\apache group\apache\...\page.php on line ..."
> 
> What's the problem wiht mysql_fetch_array() or other?
> 
> Thanks!
> Mike
> 
> 
> 
> 
> 
> 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]