String manipulation in PHP 5
Posted: Thu May 11, 2006 9:23 am
I have the following header:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Expires: -1 Pragma: no-cache Cache-Control: no-cache Set-Cookie: JSESSIONID=74E66481C486668AA1DDDEED2F7A37A8; Path=/travelsearch Content-Type: text/xml;charset=ISO-8859-1 Content-Length: 97 Date: Thu, 11 May 2006 14:01:28 GMT OK
-------------
And I want to extract a substring starting from the begining till *GMT* at the end, but leavign out the last *OK*.
PS: There are two Oks in the entire string. i'm new to php5 so not very familiar with the api. :p
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Expires: -1 Pragma: no-cache Cache-Control: no-cache Set-Cookie: JSESSIONID=74E66481C486668AA1DDDEED2F7A37A8; Path=/travelsearch Content-Type: text/xml;charset=ISO-8859-1 Content-Length: 97 Date: Thu, 11 May 2006 14:01:28 GMT OK
-------------
And I want to extract a substring starting from the begining till *GMT* at the end, but leavign out the last *OK*.
PS: There are two Oks in the entire string. i'm new to php5 so not very familiar with the api. :p