Codice PHP:
$stringa "<tag>ciao</tag>";
echo 
substr($stringastrpos($stringa">")+1strrpos($stringa,"</"));