Re: get some part of text
| From: | Kim Steinhaug | Date: | Fri, 14 Nov 2003 21:44:41 +0000 |
| Subject: | Re: get some part of text | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169688@lists.php.net to get a copy of this message | ||
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" <web_tur@yahoo.com> wrote in message
news:20031114200917.29551.qmail@pb1.pair.com...
> 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