preg_replace haluz.php
public php v1 · immutable<?php$a=array('a'=>"A",'b'=>"B",'c'=>"C");$s="a b c d e f g h";$p='/([a-c])/';$r='$a[$1]';$x=preg_replace($p,$r,$s);$y=preg_replace($p.'e',$r,$s);echo $s."<br>";echo $x."<br>";echo $y."<br>";?><?php$a=array('a'=>"A",'b'=>"B",'c'=>"C");$s="a b c d e f g h";$p='/([a-c])/';$r='$a[$1]';$x=preg_replace($p,$r,$s);$y=preg_replace($p.'e',$r,$s);echo $s."<br>";echo $x."<br>";echo $y."<br>";?>