how to replace 'abc' to 'a\0\0c'

3li

New Member
how to replace 'abc' to 'a\0\0c'the following code is fail and give output 'ac'\[code\]<?php $input = 'abc'; $pattern = '/b/i'; $replace = "\\0\\0"; $output = preg_replace($pattern, $replace, $input); echo $output;?>\[/code\]
 
Top