<? php
$Src = 'images/pages/clients/logos/clnt_aljareera_img.jpg';
$pttn= '/&Src:'.$Src.'/';
$string=preg_replace($pttn,'',$string,1);
?>
//output Error: Unknown modifier ‘p’ in
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your string contains a whole mess of
/which would need to be escaped as\/when using/as the regex delimiter. Instead of/as the regex delimiters, use something which won’t occur in your string like~for example. You must choose a delimiting character which is guaranteed not to appear in$Src, however. You might be safer even with|than with~.What has happened is your regex delimited by
/encounters apimmediately afterimages/because it thinks it has reached the closing delimiter. The next wordpagesis mistakenly treated as a string of regex modifiers.PHP sees the regular expression: