Say I have values on my page, like #100 #246, What I want to do is scan the page for values with a # before them and then alter them to put a hyperlink on it
$MooringNumbers = '#!' . $MooringNumbers . ' | ' . '#!' . $row1["Number"];
}
$viewedResult = '<tr><td>' .$Surname.'</td><td>'.$Title.'</td><td>'.$MooringNumbers . '</td><td>'.$Telephone.'</td><td>' . '<a href="rlayCustomerUpdtForm.php?id='.$id.'">[EDIT]</a></td>'.'<td>'. '<a href="deleteCustomer.php?id='.$id.'">[x]</a></td>'. '</tr>'; preg_replace('/#!(\d\d\d)/', '<a href="update.php?id=${1}">${1}</a>', $viewedResult);
echo $viewedResult;
This is the broken code which doesnt work.
Normal link Normal text, Product price : 450 ™
. Here preg_replace wont work like expected... – markcial Dec 31 '10 at 11:07