str_split for PHP4?
From: LRW (news_at_celticbear.com)
Date: 11/03/04
- Next message: FreewareTown.com: "Free Software"
- Previous message: Jesper Nielsen: "Re: mail() stopped working"
- Next in thread: Brion Vibber: "Re: str_split for PHP4?"
- Reply: Brion Vibber: "Re: str_split for PHP4?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 3 Nov 2004 14:16:10 -0800
Is there a function in PHP4 that does the same thing as str_split?
Or, is there simply a better way of doing this?
$the_tag = "109947744176"; // a unix timestap with 2 extra characters
$arr0 = substr(chunk_split($the_tag, 10, ':'), 0, -1); // mark off the
1st 10 characters
$arr1 = explode(":",$arr0); // separate the 1st 10 characters
$arr1_time = $arr1[0]; // collect the actual unix timestamp
$convtime = date("h:i:s a - d F Y",$arr1_time); // convert to human
readable time
echo $convtime;
Thanks!
Liam
- Next message: FreewareTown.com: "Free Software"
- Previous message: Jesper Nielsen: "Re: mail() stopped working"
- Next in thread: Brion Vibber: "Re: str_split for PHP4?"
- Reply: Brion Vibber: "Re: str_split for PHP4?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]