|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-29 12:16 UTC] nlopess@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
parse_url() is a great function, but a counterpart to it would be even better. Can we have a create_url() or create_query_string() function which would take an array of items and build it using the local value of arg_separator ? A lot of users do NOT use arg_separator because many programs are written with & as the separator (and there is little documentation about it). Programmers should want to accomodate ALL users though and support those which use ";" or "|" as the separator when writing programs designed to display URLs to get from page to page of their application. $base = "/search.php"; $qs = array ("action" => "search", "word" => "php"); echo create_url($base, $qs); If the arg_separator is set to ";" the above script would output: /search.php?action=search;word=php Also, ini_get("arg_separator") and get_cfg_var("arg_separator") don't work if it was set in .htaccess. Could we perchance also have get_master_cfg_value() and get_local_cfg_value()? Those would help solve the problem above, though programmers would have to write their own create_url() function to build urls with the arg_separator value. All three of those should be supported by PHP natively IMHO.