I've come across this problem enough that I want to find out if there's a 
way to make it work, or if this is just a limitation of PHP.  Here's what 
I'm trying to do:

print split("=",$testString)[0];

This gives me a syntax error.  I've also tried:

print (split("=",$testString))[0];

Along with other permutations...  the only way I can get this to work how 
I want it to is to create a temporary variable first.

$tempVar = split("=",$testString);
print $tempVar[0];

Now I guess this is easy enough to do, but I'm just used to doing it the 
other way.  And the documentation for split() says that it should return 
an Array... why can't I operate on it as I would a normal array?

Anyways, thanks for any help.  I guess I'm just too used to Python. :-D

Ray Van Dolson

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

Reply via email to