$string = 'http://site.com/category/1/news/2134/'; // '1' is dynamic
How can I change 1 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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This replaces the number by 56.
This approach uses a regex with assertions.