Mailinglisten-Archive |
Hallo,
ich möchte aus einer Zeichenkette (z.b. http://www.php-center.de) einen
Link erzeugen. Folgendes habe ich bisher gemacht:
<form action = "<?php print $PHP_SELF; ?>" methode="get">
<textarea name="test"></textarea>
<input type="submit">
</form>
</html>
<?php
if ($test)
{
print "<br><a href='$array[0]' target='_new'>$array[0]</a></b><br>";
if (preg_match_all("/http:\/\/www\.\w+\S+\b/", $test, $array) ) {
{
for ($x = 0; $x< count($array); $x++)
{
for ($y = 0; $y< count($array[$x]); $y++)
print "<br>$test<a href='".$array[$x][$y]."'
target='_new'>".$array[$x][$y]."</a></b><br>";
}
}
}
Der Link wird auch ohne Probleme erzeugt, nur soll der Link genau an der
Stelle sein, wo vorher die Zeichenkette war.
Vielen Dank
Martin
php::bar PHP Wiki - Listenarchive