Codice PHP:
$testo = "testo <img src=\"img/test.png\"> e testo";
if (preg_match('/src="(.*?)"/i', $testo, $match))
{
$testo = $match[1];
}
echo $testo;
Codice PHP:
$testo = "testo <img src=\"img/test.png\"> e testo";
if (preg_match('/src="(.*?)"/i', $testo, $match))
{
$testo = $match[1];
}
echo $testo;
"Dai diamanti non nasce niente, dal letame nascon fiori."
Fabrizio De Andrè