Get last parameter of url in php -
possible duplicate:
extracting last segment on uri
i want last parameter of url eg.
http://www.youtube.com/embed/adu0qnq4eds
i have full url above , want last parameter php adu0qnq4eds
please help
something this?
echo end(explode("/", $url)); this throw error if strict error reporting enabled. avoid this, split them this:
$parts = explode("/", $url); echo end($parts);
Comments
Post a Comment