doddsey_65 Posted May 18, 2011 Share Posted May 18, 2011 im trying to do a complex(i think) prg replace but i keep getting the error: Failed evaluating code: $lang->showing-1,1 the code i am trying to replace is: <asf: lang[showing-<asf: var[num_report_alerts]>,<asf: var[num_report_alerts]>]> and the preg_replace is: $content = preg_replace('|\<asf: lang\[(.*?)-(.*?)\]\>|e', '$lang->replace_vars($lang->//1, array(\\2))', $content); its supposed to take everything inside <asf: lang[]> and echo \\1 which would be "showing" and then add \\2 into an array which would be "array(1,1)". So the output would be showing 1 of 1. Anyone know where im going wrong? Link to comment https://forums.phpfreaks.com/topic/236700-preg_replace/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.