note 12115 deleted from function.parse-str by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 21:16:48 +0000 |
| Subject: | note 12115 deleted from function.parse-str by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22205@lists.php.net to get a copy of this message | ||
[Editor's Note: See also func_get_arg() and func_get_args() --zak@php.net]
This is very handy for passing arguments to functions, helping to limit the number of arguments for
functions.
function html_input ($name, $data, $args)
{
$args = parse_str($args);
print ("<input name=$name value=$data size=$args[size]
maxlength=$args[maxlength]>");
}
html_input
('test','foo','size=42&maxlength=42&jScript=verifyText');