note 47879 modified in function.strpos by danbrown

From: Date: Sun, 17 May 2009 16:43:17 +0000
Subject: note 47879 modified in function.strpos by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154883@lists.php.net to get a copy of this message
here a little function for tag parsing <?php function parsing($tag,$string) { $start=strpos($string,"<" . $tag . ">" ); $start=$start + strlen("<" . $tag . ">"); $end=(strpos($string, "</" . $tag . ">")); $num= ($end - $start); $valore=substr($string,$start,$num); return $valore; } ?> --was-- here a little function for tag parsing function parsing($tag,$string) { $start=strpos($string,"<" . $tag . ">" ); $start=$start + strlen("<" . $tag . ">"); $end=(strpos($string, "</" . $tag . ">")); $num= ($end - $start); $valore=substr($string,$start,$num); return $valore; } http://php.net/manual/en/function.strpos.php

« previous php.notes (#154883) next »