Welcome To Snipplr


Everyone's Recent Snippets Tagged array



1 2 3 4 5 6 ... 13
1 1917 posted 14 years ago by frederichoule
0 1507 posted 14 years ago by mike_fowler
0 1054 posted 14 years ago by neilking
0 1978 posted 14 years ago by Japan
# function *formatArrayForDisplay* ## parameters: * **array** a 1- or 2-dimensional array for output * **mode** accepts **human** or **PHP** * **human** displays using `<pre>` tags and print_r * **PHP** displays PHP styl...
1 1804 posted 14 years ago by daveespionage
Re-indexes an array so that the array keys count up from zero. This is useful if you have previously removed some array nodes.
0 1165 posted 14 years ago by f6design
Removes 'false', '0', 'null' or '' from the array
0 1609 posted 14 years ago by f6design
converts array (which is reference) in format <code> array(0 => array('id' => 1, 'name' => 'orange'), 1 => array('id' => 3, 'name' => 'banana')); </code> to <code> array(1 => array('id' => 1, 'name' => 'orange'), 3 => array('id' => 3, 'n...
0 1210 posted 14 years ago by slav123
0 1043 posted 14 years ago by marwac6
0 1122 posted 14 years ago by marwac6
This simply takes an array and coverts it to variables. E.g. If you had an array, $array = array("key" => "value"), after running this script, $key would be "value".
0 1332 posted 14 years ago by mloberg
Different formats for listing states.
0 1484 posted 14 years ago by MikeNGarrett
Quite trivial but can be needed sometimes. At least I know where to look when i'll forget it
1 1307 posted 14 years ago by gandreini
I wanted to pass a form submission (array) as a JSON object to another function. Some form field were created with JS, to identify them their names have been concatenated with unique IDs, etc. In order to access values of that JSON obj I needed to...
1 1655 posted 14 years ago by iroybot
I wanted to pass a form submission (array) as a JSON object to another function. Some form field were created with JS, to identify them their names have been concatenated with unique IDs, etc. In order to access values of that JSON obj I needed to...
0 1538 posted 14 years ago by iroybot
All glory to the ml function.
0 1319 posted 14 years ago by pablo_PXL
6 1648 posted 14 years ago by Roaa
This code comes from the php documentation (see url)
0 1228 posted 14 years ago by jli
0 1262 posted 14 years ago by danhanly
2 2769 posted 14 years ago by krillzip
0 1300 posted 14 years ago by takel
0 1089 posted 14 years ago by takel
A little function used to set cookies as arrays of values instead of single combinations key->value. Note that it saves values as a stack.
1 1226 posted 14 years ago by claudiowebdesign
Quick and easy javascript in_array function. It's not perfect, but if you need something quick, this is it.
1 1091 posted 14 years ago by cornellsteven
0 1419 posted 15 years ago by lajlev
1 2 3 4 5 6 ... 13