Welcome To Snipplr


Everyone's Recent Snippets Tagged array



1 ... 6 7 8 9 10 ... 13
I found this awesome class by [email protected] and can't help but share it.
1 1493 posted 15 years ago by chrisaiv
A utility function to preserve an array in a session. Adding the newest element to the beginning of the array and popping out the last one. Useful for displaying for instance; your last searches option in your website.
1 1643 posted 15 years ago by Heroftime
Searches all array elements for a given substring. Returns an array of found key=>value pairs or false if not found.
0 1238 posted 15 years ago by lancemonotone
Simple function that sorts a bi-dimensional array by one of it keys.
1 1655 posted 15 years ago by AlejoLuc
A class which wraps a parent list containing mixed object types, to provide smaller strongly typed sub-lists of objects. These sub-lists can be modified, which then modifies the parent list concurrently (without events being triggered). Supports the...
0 1340 posted 15 years ago by bryanlyman
1 1177 posted 15 years ago by iaian7
0 1394 posted 15 years ago by tm
1 1558 posted 15 years ago by giak
0 1359 posted 15 years ago by giak
1 1106 posted 15 years ago by giak
0 1640 posted 15 years ago by giak
remove and item or items from array
0 914 posted 15 years ago by edektor
0 1280 posted 15 years ago by unravelme1
This is a class/demonstration for creating dynamic properties and storing them in an array
1 1070 posted 15 years ago by mpcircuitry
This function checks to see if two arrays are equal
1 1383 posted 15 years ago by jlvallelonga
Consider the following piece of code which compares two arrays to find which elements exist in outerArray that do not exist in innerArray:
0 1289 posted 15 years ago by quan
Before: ` Array ( [0] => Array ( [total_sessions] => 24 [study_type_id] => 1 ) [1] => Array ( [total_sessions] => 24 [study_type_id] => 2 )...
0 1107 posted 16 years ago by iloveitaly
0 1018 posted 16 years ago by boondoklife
0 1242 posted 16 years ago by rvachere
This creates an array of various linux shell names, loops through the array and ouputs a file called shell_locations.txt showing where the shells are located on the linux system.
0 1692 posted 16 years ago by webonomic
2 1559 posted 16 years ago by forchid
A script I used for quickly load a file (see line 3) and then make a table which had linenumbers on each line. You may want to add a +1 when its generating the table...
0 1356 posted 16 years ago by Knarf
For more information, see php.net, under usort It works with dates Replace 0 for the array's key you want to sort. For example, if you have a start_date array key you would like to compare, then you would replace 0 for start_date. If you wan...
0 1604 posted 16 years ago by leonelsantos
A function i made for running trim on all elements in an array
1 1550 posted 16 years ago by Knarf
1 1198 posted 16 years ago by adrianparr
This can be tested using the following piece of code var a = [1, 2, 3, 4, 5]; alert(a.size());
0 1162 posted 16 years ago by arunpjohny
This function is add 'each' function to the javascript Array object.
1 1028 posted 16 years ago by arunpjohny
Create log.txt in scripts directory and set permissions to 0666 before use.
0 1348 posted 16 years ago by Nek
1 ... 6 7 8 9 10 ... 13