Changeset 401 for branches/1.1dev/lib/Utilities.inc.php
- Timestamp:
- Aug 8, 2012 6:57:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/Utilities.inc.php
r265 r401 321 321 * Converts a PHP Array into encoded URL arguments and return them as an array. 322 322 * 323 * @param mixed $data An array to transverse recursiv ly, or a string323 * @param mixed $data An array to transverse recursively, or a string 324 324 * to use directly to create url arguments. 325 325 * @param string $prefix The name of the first dimension of the array. … … 335 335 if (is_array($data)) { 336 336 foreach ($data as $key => $val) { 337 // If the prefix is empty, use the $key as the name of the first dimen tion of the "array".338 // ...otherwise, append the key as a new dimen tion of the "array".337 // If the prefix is empty, use the $key as the name of the first dimension of the "array". 338 // ...otherwise, append the key as a new dimension of the "array". 339 339 $new_prefix = ('' == $prefix) ? urlencode($key) : $prefix . '[' . urlencode($key) . ']'; 340 340 // Enter recursion. … … 342 342 } 343 343 } else { 344 // We've come to the last dimen tion of the array, save the "array" and it's value.344 // We've come to the last dimension of the array, save the "array" and it's value. 345 345 $args[$prefix] = urlencode($data); 346 346 } … … 358 358 * Converts a PHP Array into encoded URL arguments and return them in a string. 359 359 * 360 * @param mixed $data An array to transverse recursiv ly, or a string360 * @param mixed $data An array to transverse recursively, or a string 361 361 * to use directly to create url arguments. 362 * @param string $prefix The name of the first dimen tion of the array.362 * @param string $prefix The name of the first dimension of the array. 363 363 * If not specified, the first keys of the array will be used. 364 364 * … … 516 516 /** 517 517 * If magic_quotes_gpc is in use, run stripslashes() on $var. If $var is an 518 * array, stripslashes is run on each value, recursiv ly, and the stripped518 * array, stripslashes is run on each value, recursively, and the stripped 519 519 * array is returned 520 520 *
Note: See TracChangeset
for help on using the changeset viewer.