Re: Syntax ::: does explode('-', $string)[2] ::: have a twin brother?
| From: | Daniel Convissor | Date: | Tue, 19 Dec 2000 05:39:00 +0000 |
| Subject: | Re: Syntax ::: does explode('-', $string)[2] ::: have a twin brother? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30996@lists.php.net to get a copy of this message | ||
Sire:
> $string = '2000-05-12';
> $to = explode('-', $string)[2];
The only way out of this is to use something that doesn't return an array.
For example:
$to = substr("$string", -2);
But, that's not exactly what you're asking.
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409