I'd like to replace only "a" to "*". and "aa", "abc" etc are not to be replaced.
How do I do that with preg_replace.
<?
$intext="Have a good day";
$patterns = array('/a$/');
$replace = array ("*");
$intext=preg_replace($patterns, $replace, $intext);
echo $intext."<P>";
?>
It should show "Have good day". but it always show me "Hve good dy".
Any idea?