> Please cast an eye over the following code and output and tell me why
> $k and $v are not being set:
> 
> 
> Code:
> -----------------------------
> 
> $ser = array( 'first', 'second', 'third', 'fourth', 'fifth' );
> 
> reset($ser);
> while ( list($key, $val) = each($ser) );
> {
>     echo "\$key = $key, \$val = $val<br>";
> }

Small typo:

while ( list($key, $val) = each($ser) );

change into:

while ( list($key, $val) = each($ser) )

Remove the ";"

HTH
Erwin

P.S.: Take a break ;-))

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

Reply via email to