[snip] job_resp errorCode="4194337" description="Originator you"
I need to take only errorCode value from this string. I am thinking and thinking and can not find how to to. I can split with "=" but allways erroCode place is changing in the string. [/snip] If the line always begins with job_resp errorCode=" and the error code is always 7 digits long do $myString = "job_resp errorCode=\"4194337\" description=\"Originator you\""; $myErrCode = substr($myString, 20, 7); echo $myErrCode."\n"; Watch the quotes though, they may have to be escaped as above -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php