If you mean you want to parse it from a string you can use parse_url()
$url = "http://website.com/tagged?tag=egg&offset=1"; $parsed = parse_url($url); var_dump($parsed); // Result Array ( [scheme] => http [host] => website.com [path] => /tagged [query] => tag=egg&offset=1 )
People are also looking for solutions to the problem: Peek ahead when iterating an array in PHP
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
Find the answer in similar questions on our website.
- 334 php - A helper function for mysqli that dynamically binds params in prepared statement?
- 623 Foreach Loop Only Iterating Once - PHP
- 219 php - Automatic login in web app if user is already logged in Google Apps
- 327 php - Same Origin Policy with My REST API
- 640 php - how to match a certain value inside an array using eloquent laravel 5.8?
- 466 php - Laravel 5.8 Search function in Restful API
- 866 php - How to customize/extend WordPress without getting impacted from future core/plugin updates?
- 667 php - Symfony 4 make:entity --regenerate fail with: No entities were found in the "App" namespace
- 718 Large data import using PHP and mysql to multiple tables with foreign keys
- 248 php - Caching API requests with JWT auth
- 503 php - Drupal 7 Recent log messages
- 512 php - Datatable edit, delete common button on top with select row function without using editor datatables
- 50 php - Remove the breadcrumbs in wordpress using hook
- 970 php - using jquery/bootstrap, save data without using checkboxes