A function to build query strings
function qlink( $q ){
GLOBAL $QUERY_STRING;
if ( ! $q )
return $QUERY_STRING;
$ret = "";
foreach( $q as $key => $val ) {
if ( strlen( $ret ) )
$ret .= "&";
$ret .= urlencode( $key ) . "=" . urlencode( $val );
}
return $ret;
}
$q = array ( name => "Joe",
interest => "coding",
homepage => "http://www.google.com"
);
print qlink( $q );
?>