con la sequenza da te suggerite:
cosi funziona ma se nel testo č presente una ] la sostituisce con " target="_blank"Codice PHP:$testo = str_replace('[URL="', '<a href="', $testo);
$testo = str_replace('"]', '" target="_blank">', $testo);
$testo = str_replace('[/URL]', '</a>', $testo);
echo $testo;
risultato:
// [URL=http://forum.html.it]forum.html.it
Codice PHP:$testo = str_replace("[URL=", '<a href="', $testo);
// purtoppo mi sost il codice č come la tua 3 riga
$testo = str_replace('[/URL]', '</a>', $testo);
$testo = str_replace("]", '" target="_blank">', $testo);
echo $testo;
risultato:
// [url="http://forum.html.it"]forum.html.it[/url]
cichity74

cichity74
Rispondi quotando