I have following pattern in php:
products/546/orders
The number part will be dynamic. I have to find that pattern in following string.
user/proxy/products/546/orders/?cookie=admin
Any help will be appreciated!
I have following pattern in php:
products/546/orders
The number part will be dynamic. I have to find that pattern in following string.
user/proxy/products/546/orders/?cookie=admin
Any help will be appreciated!
Use this to extract the number from the string
preg_match('~products/(\d+)/orders~', $yourUrl, $matches)