I have this url and i want to take variable values in php from this url how to do this.
http://example.com/core/click/3492/3389
Use parse_url() function to return the path part of the url.
<?php
// returns: /core/click/3492/3389
$path = parse_url('http://example.com/core/click/3492/3389', PHP_URL_PATH);
Then you can explode() the path into its parts:
$path = explode('/', ltrim($path, '/'));
print_r($path);
Array
(
[0] => core
[1] => click
[2] => 3492
[3] => 3389
)
parse_url is a great way to get just the path too without the additional variable assignment.$path[2] and then the url changes to /core/foo/click/3492/3389, but you didn't mention that in the question.$path[2] and $path[3].
3492or3389? Or is it something else?