Ask a Question related to PHP Notes, Design and Development.
-
cscotti@ifrance.php.net #1
note 33845 added to language.variables.external
In reply to the second post:
This function construct an HTTP vars array
It is useful for javascript/dom incompatibility with form_input_item[] names for checkboxes, multiple selects, etc.
function multi_post_item() {
$array_output = array();
$raw_input_items = split("&", $_SERVER["QUERY_STRING"]);
foreach ($raw_input_items as $input_item) {
// split this item into name/value pair
$item = split("=", $input_item);
// form item name
$item_name = urldecode($item[0]);
// form item value
$item_value = urldecode($item[1]);
if (!isset($array_output[$item_name]) ) {
$array_output[$item_name] = $item_value;
}else if (!is_array($array_output[$item_name])){
$first = $item_value;
$array_output[$item_name] = array();
$array_output[$item_name][]= $first;
$array_output[$item_name][]= $item_value;
}else{
$array_output[$item_name][]= $item_value;
}
}
return $array_output;
}
----
Manual Page -- [url]http://www.php.net/manual/en/language.variables.external.php[/url]
Edit Note -- [url]http://master.php.net/manage/user-notes.php?action=edit+33845[/url]
Delete Note -- [url]http://master.php.net/manage/user-notes.php?action=delete+33845&report=yes[/url]
Reject Note -- [url]http://master.php.net/manage/user-notes.php?action=reject+33845&report=yes[/url]
cscotti@ifrance.php.net Guest
-
note 33856 added to language.variables
ASCII is a 7-bit encoding, so there is no such thing as ASCII 228. Now 8-bit extensions of ASCII like ISO-8859-1 (Latin-1) do have a codepoint... -
note 33849 added to language.variables.external
you can convert old code to work with register_globals=off without sacrificing security. Or maybe you like working with variables the old way... -
note 33832 added to language.variables.scope
Even if an included file return a value using return(), it's still sharing the same scope as the caller script! <?php $foo = 'aaa'; $bar =... -
note 33746 added to language.variables.predefined
Globals = Off is advised for newbies, since they are more than likely to use something like: if ($pass = "admin") { $loggedin = 1; } if... -
note 33570 added to language.variables
(remove me =) "täyte" means 'filling' in finnish, "mansikka" means 'strawberry' in finnish also... ---- Manual Page --...



Reply With Quote

