Re: Best way to split string
| From: | Jason Lavigne | Date: | Sat, 25 Nov 2000 09:07:30 +0000 |
| Subject: | Re: Best way to split string | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27039@lists.php.net to get a copy of this message | ||
I would use:
$datetime = "09/12/00 12:05:00";
$datetime = split(" ",$datetime);
$date = $datetime[0];
$time = $datetime[1];
Jay
----- Original Message -----
From: "C. Marcera" <chris.m@pe-online.com>
To: <php-general@lists.php.net>
Sent: Friday, November 24, 2000 4:08 PM
Subject: Re: [PHP] Best way to split string
> I'd use:
>
> $datetime = "09/12/00 12:05:00";
> $time = $substr ($datetime, -8, 8);
>
> -C. Marcera
>
> Todd Cary <todd@aristesoftware.com> wrote in message
> news:3A1ED0B0.16DD54E9@aristesoftware.com...
> > I need to get the time token out of the following string. What is the
> > best function to use for this?
> >
> > 09/12/00 12:05:00
> >
> > Many thanks....
> >
> > Todd
> >
> > --
> > Todd Cary
> > Ariste Software
> > todd@aristesoftware.com
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>