RE: [PHP] What is going on here? list() = each()
| From: | Rick Emery | Date: | Wed, 23 Jan 2002 21:45:10 +0000 |
| Subject: | RE: [PHP] What is going on here? list() = each() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81768@lists.php.net to get a copy of this message | ||
change to:
<?
$var = "this.that";
list( $thisVal, $thatVal ) = explode( ".", $var );
echo "$thisVal, $thatVal"
?>
-----Original Message-----
From: Chris Boget [mailto:chris@wild.net]
Sent: Wednesday, January 23, 2002 3:43 PM
To: PHP-General
Subject: [PHP] What is going on here? list() = each()
<?
$var = "this.that";
list( $thisVal, $thatVal ) = each( explode( ".", $var ));
echo "$thisVal, $thatVal"
?>
What is getting echo'd out is:
"0, this"
Why? What am I missing here?
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net