[PHP] What is going on here? list() = each()

2002-01-23 Thread Chris Boget

?
$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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What is going on here? list() = each()

2002-01-23 Thread Rick Emery

change to:

?
$var = this.that;

list( $thisVal, $thatVal ) =  explode( ., $var );

echo $thisVal, $thatVal
?

-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
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]




Re: [PHP] What is going on here? list() = each()

2002-01-23 Thread Chris Boget

 change to:
 ?
 $var = this.that;
 list( $thisVal, $thatVal ) =  explode( ., $var );
 echo $thisVal, $thatVal
 ?

Silly me.

Chris
-all embarrassed now... :p


-- 
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]