- print_r: documentation ( source)
- explode: documentation ( source)
<?php
$my_url = "http://www.imdb.com/title/tt1840309/?ref_=hm_cht_t1";
function GetIMDBTitle($url)
{
$pass1 = explode("imdb.com/title/",$url);
print_r($pass1);
return $pass1[1];
}
echo GetIMDBTitle(my_url);
?>