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
Post a Comment