PHP Pass Arrays As Parameter One And Parameter Two, And Preg_Replace() Performs Multiple Replaces – String Function

<?
    $a = "Foo moo boo tool foo";
    $b = preg_replace("/[A-Za-z]oo\b/e", 'strtoupper("$0")', $a);
    print $b;
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.