I have a string with this value format:
$str = "Apple, Orange, Computer-Hardware, preg_replace, 50k";
or
$str = "Computer";
How can I convert it with preg_replace to:
$str = "<a href='p.php?s=Apple'>Apple</a>, <a href='p.php?s=Orange'>Orange</a>,
<a href='p.php?s=Computer-Hardware'>Computer-Hardware</a>, <a href='p.php?s=preg_replace'>preg_replace</a>, <a href='p.php?s=50k'>50k</a>";
$str = "<a href='p.php?s=Computer'>Computer</a>";