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? Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.