Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
this is my url

http://index.php?page=clinicbylocationtest&&city=%20lucknow"

And I want to print last element ie lucknow in my page. How Could I

Please help me

What I have tried:

this is my url

http://index.php?page=clinicbylocationtest&&city=%20lucknow"

And I want to print last element ie lucknow in my page. How Could I

Please help me
Posted
Comments
Mohibur Rashid 9-Apr-17 18:31pm    
Why lucknow is your last word? I can see your last word is " lucknow".
Why are you calling this word to be the last word? Can you explain a bit more?
Afzaal Ahmad Zeeshan 9-Apr-17 19:22pm    
Just capture the query string from URL — I believe it would be $_GET["city"] — and then access it in your own code. The last word, is a bit complex thing to answer, because the query strings must never follow a sequence in the URL, and that is why your City may come before the page query string as well.
Ajay Singh 9-Apr-17 22:01pm    
thank you my friend its working now

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900