PHP replace string

gxhewu8sow

New Member
\[code\]$string = 'http://site.com/category/1/news/2134/'; // '1' is dynamic\[/code\]How can I change \[code\]1\[/code\] to any number I want?Can't call parts of the string, its just a text-like variable.It can be done with some true regex.
 
Back
Top