Ivan Ivković Posted May 7, 2012 Share Posted May 7, 2012 <?php $string = 'Trala.lalilaa'; echo explode('.', $string)[0]; ?> Not in PHP, but doy ou think this will ever be available? Link to comment https://forums.phpfreaks.com/topic/262197-this-would-be-so-cool-any-thought-on-why-this-should-not-be-practical/ Share on other sites More sharing options...
johnny86 Posted May 7, 2012 Share Posted May 7, 2012 That is already available in PHP 5.4. It's called array dereferencing. http://php.net/releases/5_4_0.php Link to comment https://forums.phpfreaks.com/topic/262197-this-would-be-so-cool-any-thought-on-why-this-should-not-be-practical/#findComment-1343682 Share on other sites More sharing options...
scootstah Posted May 7, 2012 Share Posted May 7, 2012 That is already available in PHP 5.4. It's called array dereferencing. http://php.net/releases/5_4_0.php Yup. I can't wait for PHP5.4 to be mainstream... it is so full of awesome. Link to comment https://forums.phpfreaks.com/topic/262197-this-would-be-so-cool-any-thought-on-why-this-should-not-be-practical/#findComment-1343685 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.