preg_replace '[' , ']'
Posted: Tue May 01, 2007 11:52 pm
I am using this codeAnd its outputing
Is it for the '[' , ']' ?
If yes how to do it ??
Code: Select all
<?php
$sub = 'My foo[0]';
$replace = 'bar[0]';
echo preg_replace('/foo[0]/', $replace, $sub);
?>instead of My bar[0].My foo[0]
Is it for the '[' , ']' ?
If yes how to do it ??