I have a page on which in one part I display some references with this script: <?php echo ereg_replace("\n", "<br>", $hero->f("Ref")); ?>.
But in the references field there are some URLs. How can I transform this automatically in links?
In Cgi you can use something like... $ref =~ s/(http:\/\/\S*)/<a href=\"\1\" target=\"_blank\">\1<\/a>/g;... what could I use in PHP?