Jump to content

preg_replace, +1 to matched number


mzhou88

Recommended Posts

preg_replace("/{$match}{$_Conf['FileManip']['Splitter']}(\d+)/i","{$match}{$_Conf['FileManip']['Splitter']}".$1+1,$Read)

 

Currently I am trying to figureout how to add 1  to the (\d+). but when i do whatever i did just now, it gives me  this error:

 

Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in D:\xampplite\htdocs\includes\bbcode.php on line 134

 

thx =p

Link to comment
https://forums.phpfreaks.com/topic/43351-preg_replace-1-to-matched-number/
Share on other sites

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.