Answers for "pass query string in url php"

PHP
1

php create url with query sting from array

<?php
$data = array(
    'foo' => 'bar',
    'baz' => 'boom',
    'cow' => 'milk',
    'php' => 'hypertext processor'
);

echo http_build_query($data) . "\n";
echo http_build_query($data, '', '&');

?>
Posted by: Guest on March-28-2020
-1

get the url without the query string php

// get the url before the first occurence of "?"
$url = strtok($_SERVER["REQUEST_URI"], '?');
Posted by: Guest on October-29-2021

Code answers related to "pass query string in url php"

Browse Popular Code Answers by Language