Im using preg_replace to successfuly replace anything found in the search array:
Code: Select all
$search = array ("'a'", "'b'", "'c'");
$replace = array ("","","");
$text = preg_replace ($search, $replace, $document);My question is, how to I capture, or test for the successful return of this function? In other words, if something is found and replaced, will $text = 1? or will $text = "True".
I want to be able to get the return code of this function, to be able to display some info after the fact.
Thanks.