Reg Expr trouble!

Associate
Joined
30 Dec 2005
Posts
415
Yup, once again i'm back with another regular expression problem.

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:
Back
Top Bottom