Jump to content

htmlentities


homer.favenir

Recommended Posts

hi,

i want to extract the text inside "<" and ">"

 

e.g.

$str = '<statex refid="ALRdi335-14">, which means Alabama Regulations, Division 335-14 </statex>';

i want to extract "statex refid="ALRdi335-1" in $str

 

i tried

$str = '<statex refid="ALRdi335-14">, which means Alabama Regulations, Division 335-14</statex>';
$strt_tag = strpos($str, "<");
$end_tag = strpos($str, ">");

echo substr($str, $strt_tag, $end_tag);

 

but it returns nothing...

can you help me please...

thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/159677-htmlentities/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.