RE: Perl style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
$tmparray = split(',', $csvstring);
$element5 = $tmparray[5];

. to something like this:

$element5 = (split(',', $csvstring))[5];
[/snip]

The syntax is correct in your first example, AFAIK the PERL syntax you
describe cannot be done straight up in PHP unless you write a function to
handle it. You could always write a PHP extension.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux