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 990 posted 14 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 977 posted 14 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 788 posted 14 years ago by lancemonotone
Simple function that sorts a bi-dimensional array by one of it keys.
1 1057 posted 14 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 845 posted 14 years ago by bryanlyman
1 766 posted 14 years ago by iaian7
0 863 posted 14 years ago by tm
1 984 posted 14 years ago by giak
0 868 posted 14 years ago by giak
1 659 posted 14 years ago by giak
0 1029 posted 14 years ago by giak
remove and item or items from array
0 537 posted 14 years ago by edektor
0 806 posted 14 years ago by unravelme1
This is a class/demonstration for creating dynamic properties and storing them in an array
1 665 posted 14 years ago by mpcircuitry
This function checks to see if two arrays are equal
1 813 posted 14 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 801 posted 14 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 673 posted 14 years ago by iloveitaly
0 609 posted 14 years ago by boondoklife
0 663 posted 14 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 998 posted 14 years ago by webonomic
2 817 posted 15 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 812 posted 15 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 938 posted 15 years ago by leonelsantos
A function i made for running trim on all elements in an array
1 947 posted 15 years ago by Knarf
1 742 posted 15 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 719 posted 15 years ago by arunpjohny
This function is add 'each' function to the javascript Array object.
1 609 posted 15 years ago by arunpjohny
Create log.txt in scripts directory and set permissions to 0666 before use.
0 757 posted 15 years ago by Nek
1 ... 6 7 8 9 10 ... 13