Answers for "create query string from array php"

PHP
1

php get query string

<?php
	echo $_GET["query_name"]; // url queries are stored in $_GET 
?>
Posted by: Guest on November-17-2020
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

Code answers related to "create query string from array php"

Browse Popular Code Answers by Language