preg_replace çalışmıyor: (

0 Cevap php

Tamam ben bu PHP komut dosyası var:

<?php

$stringz = "Dan likes to eat pears and his favorite color is green!";
$patterns = array("/pears/","/green/");
$string = preg_replace($patterns, '<b>\\1</b>', $stringz);
echo "<textarea rows='30' cols='100'>$string</textarea>";

?>

and when I run it I get this: Dan likes to eat <b></b> and his favorite color is <b></b>!

bunu bir kelime var herhalde ... ama öyle değil bir ...

0 Cevap