dear Kim, Thanks for your clever soltion but;
If string will have another errorCode before 'job_resp errorCode=" It will use first one value. What can we do better than this one? "Kim Steinhaug" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You could ofcourse to the "easyway out" splitting, hehe. > > example : > $yourstring = 'job_resp errorCode="4194337" description="Originator you"'; > $temp = explode('errorCode="',$yourstring); > $temp2=explode('"',$temp[0]); > echo $temp2[0]; > > Voila! > > Should always work, aslong as there there are always " around the text. > > -- > Kim Steinhaug > --------------------------------------------------------------- > There are 10 types of people when it comes to binary numbers: > those who understand them, and those who don't. > --------------------------------------------------------------- > > > "Qt" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > dear Sirs, > > > > I have this string; > > > > 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. > > > > Any idea > > > > Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php