Mega Code Archive

 
Categories / Php / Functions
 

A Function to Build Query Strings

<html> <head> <title>Using http_build_query() to Build Query Strings</title> </head> <body> <?php $q = array (     'name' => "Tom",     'interest' => "Movie",     'homepage' => "http://www.example.com"     ); $query = http_build_query( $q ); print $query; ?> <p> <a href="anotherpage.php?<?php print $query ?>">Go!</a> </p> </body> </html>