php - String Replace Date & Time -
A line of my XML looks like this:
$ ob_time = $ xml- & gt; Observation_time_rfc 822; Echo $ ob_time; Output looks like this:
Thursday, 09 October 2014 22:59:16 +0200
But what should I look like
2014-10-09 + 22 % 3A 59 % 3a 16
I think it can do the place of the string, someone can help me find me! Thanks!
edit : use a ghost solution, it must be correctly Handles offset timezone First you need to reformat your date. You do this by parsing it with strtotime and formatting it with the date function. They are "URL instead of the funny% 3A" actually are URL-encoded characters: $ date = date ('y-m-d h: i: s', strotom ($ ob_time)); $ Date = urlencode ($ date); // 2014-10-09 + 20% 3A 59% 3A 16
Comments
Post a Comment