How can I out from a variable like this:
$var1 = "www.game.mysite.com/folder/page.php?var1=1&var2=2";
And then I want somehow to get only the “page.php”, what ever it is set to be?
Any ideas how to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would not use a regex for that, but
parse_urlandbasename:See the example on codepad.