[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]
How about this, also...
$pos = strpos('errorCode="',$error_message);
$error_code = substr($error_message,$pos+11,7);
if the error code is always 7 digits.
or the good old standby of regular expressions...
preg_match('/errorCode="([0-9]+)"/',$error_message,$matches);
$matches[1] should contain your code...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php