Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Some times we need to find the some data or get the specific key data from URL for that we need to break the whole strings in “&” and we have to store data as array in variable and after that we have to make search so doing this , is taking more time and more complexity , so doing in best way .
Follow Some Steps:
1: Let the URL is
http://mysite3994.com?test1=blah&test2=blahblah
2:” URLComponents ” method provides the better way to handle the query on URL .
3: Here the params are “test1”, “test2” etc.
4:
5: Here queryItems contains all params data So we are doing the query on this params like “test1”
it will provide the respected value “blah” .
6: Now we can make any query on params.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.