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

ios - Change Storyboard View using Seague -

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -