Yup, once again i'm back with another regular expression problem.
In theory it should replace the following string with some php code in the array $cur_row:
*php[x]*
...where x is an integer in the array matches.
When I run this code, I get this error:
Anyone got any ideas?
Code:
preg_replace('/*php\[{$matches[$i]}\]*/','<?php '.$cur_row["code"].' ?>',$content);
In theory it should replace the following string with some php code in the array $cur_row:
*php[x]*
...where x is an integer in the array matches.
When I run this code, I get this error:
Warning: preg_replace() [function.preg-replace]: Compilation failed: nothing to repeat at offset 0 in D:\Websites\SIW\includes\functions.php on line 116
Anyone got any ideas?
Last edited: