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 1589 posted 16 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 1773 posted 16 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 1338 posted 16 years ago by lancemonotone
Simple function that sorts a bi-dimensional array by one of it keys.
1 1772 posted 16 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 1469 posted 16 years ago by bryanlyman
1 1273 posted 16 years ago by iaian7
0 1501 posted 16 years ago by tm
1 1671 posted 16 years ago by giak
0 1472 posted 16 years ago by giak
1 1219 posted 16 years ago by giak
0 1742 posted 16 years ago by giak
remove and item or items from array
0 991 posted 16 years ago by edektor
0 1395 posted 16 years ago by unravelme1
This is a class/demonstration for creating dynamic properties and storing them in an array
1 1181 posted 16 years ago by mpcircuitry
This function checks to see if two arrays are equal
1 1496 posted 16 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 1384 posted 16 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 1222 posted 16 years ago by iloveitaly
0 1130 posted 16 years ago by boondoklife
0 1648 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 1813 posted 16 years ago by webonomic
2 1662 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 1479 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 1734 posted 16 years ago by leonelsantos
A function i made for running trim on all elements in an array
1 1677 posted 16 years ago by Knarf
1 1303 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 1263 posted 16 years ago by arunpjohny
This function is add 'each' function to the javascript Array object.
1 1129 posted 16 years ago by arunpjohny
Create log.txt in scripts directory and set permissions to 0666 before use.
0 1487 posted 16 years ago by Nek
1 ... 6 7 8 9 10 ... 13