Sunday, April 22, 2012

Get value by tag name from the XML result using PHP


        /**
* A simple process to retrive XML data
*/
function get_value_by_tag_Name( $str, $s_tag, $e_tag)
{
$s = strpos( $str,$s_tag) + strlen( $s_tag);
$e = strlen( $str);
$str= substr($str, $s, $e);
$e = strpos( $str,$e_tag);
$str= substr($str,0, $e);
$str= substr($str,0, $e);
return  $str;
}




Credits
http://reazulk.wordpress.com

No comments:

Post a Comment