We have a url
http://www.video.com/tube/videos/429000/something.html How do I cut out the number 429000 from here?
We have a url
http://www.video.com/tube/videos/429000/something.html How do I cut out the number 429000 from here?
$arr=split('/',$ваша строка); // $ arr [5] = 429000
Probably something like this:
$url = "http://www.video.com/tube/videos/429000/something.html"; if (preg_match("|/videos/(\d+)/|", $url, $match)) { echo $match[1]; } Source: https://ru.stackoverflow.com/questions/48920/
All Articles