RE: [PHP] Can I get the text from a string that is between two strings?

From: Date: Mon, 06 Nov 2000 13:42:37 +0000
Subject: RE: [PHP] Can I get the text from a string that is between two strings?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23877@lists.php.net to get a copy of this message
prueba con if( ereg("<txtbody>(.*)</txtbody>", $text, $result) ) { $ok = $result[1]; } > I need to get from a string the text between two xml tags. > For example: The large string is: > > <article> > <title>here goes title</title> > <txtbody>Here goes the body of the article</txtbody> > </article> Salutem JCarlos Sanz juanrak@svalero.es

« previous php.general (#23877) next »