note 41368 deleted from function.implode by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 08 Apr 2004 00:38:16 +0000 |
| Subject: | note 41368 deleted from function.implode by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-67791@lists.php.net to get a copy of this message | ||
Note Submitter: PCnity@LuPuSweb.net
----
<?php
//Hello every body... This is a litle function
//(the siplest way) to do the query_string from an array.
function Create_Query($Array){ #Tvorenie QUERY_STRINGu
foreach ($Array as $index => $value){
$Output[]=$index.'='.$value;
}
$Output = implode("&", $Output);
return $Output;
}
//EXAMPLE::
$LS['ln']='SK';
$LS['page']='index';
$LS['action']='login';
Create_Query($LS);
//The output would be::
//ln=SK&page=index&action=login
?>