Jump to content

[SOLVED] Variables/preg_replace


SoberDude

Recommended Posts

why do you have quotes around the variable ?  it would be trying to literally use $variable as the regular expression to match it to.

 

see the example here http://us.php.net/preg_replace

 

If you still dont get it, we need specific code examples, not "blah blah something like this" to find the issue

why do you have quotes around the variable ?  it would be trying to literally use $variable as the regular expression to match it to.

 

see the example here http://us.php.net/preg_replace

 

If you still dont get it, we need specific code examples, not "blah blah something like this" to find the issue

I know, I was just using the variable as an example. I know it is an incorrect syntax.

 

The actual one is more like:

 

$newvar = preg_replace_callback('/' . $var . '([^\b\(]*.)/', "remove_caps", $newvar);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.