How to trim a string in Php? -


i looking vimeo id 95235223 complete link of http://vimeo.com/95235223. how can in php trim function work or somthing else. need please.

use parse_url(), like:

$url = "http://vimeo.com/95235223"; $parsed = parse_url($url); $id = str_replace("/", "", $parsed["path"]); echo $id; //gives 95235223 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -