Warning: Unknown modifier ...
I have been working on a preg_replace function that is used to create and manipulate customized code while turning it into html code. Well anyways, I am getting the following errors:
http://cpradio.net/advBlogger/user/display.php?cid=18
If anyone thinks they know the answer or thinks they can retrieve the answer, send me a pm or post such here, and I will pm you a link to the admin area where you will be able to write new "code" tags and see how it is supposed to operate.
Here is the function that is computing those errors:
PHP Code:
function ParseCode($text = "Invalid use of Function",$abCode = 1) {
if ($abCode) {
$abArray = array();
$htmlArray = array();
$query = mysql_query("select * from abCode");
for($i=0;$i<mysql_numrows($query);$i++) {
$abTag = mysql_result($query,$i,"abTag");
$htmlTag = mysql_result($query,$i,"htmlTag");
$option = 1;
while (preg_match("/\{option\}/is",$abTag)) {
$abTag = preg_replace("/\{option\}/is","(.*?)",$abTag,1);
$option++;
}
while (preg_match("/\{param\}/is",$abTag)) {
$abTag = preg_replace("/\{param\}/is","(.*?)",$abTag,1);
$option++;
}
$abArray[$i] = $abTag;
$replace = 1;
while (preg_match("/\{option\}/is",$htmlTag)) {
$htmlTag = preg_replace("/\{option\}/is",$$replace,$htmlTag,1);
$replace++;
}
while (preg_match("/\{param\}/is",$htmlTag)) {
$htmlTag = preg_replace("/\{param\}/is",$$replace,$htmlTag,1);
$replace++;
}
$htmlArray[$i] = $htmlTag;
}
for ($i=0;$i<sizeof($abArray);$i++) {
// line 505 below
$text = preg_replace("/".preg_quote($abArray[$i])."/",$$htmlArray[$i],$text);
}
return $text;
}
}
-Matt