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 824 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 774 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 596 posted 14 years ago by lancemonotone
Simple function that sorts a bi-dimensional array by one of it keys.
1 872 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 680 posted 14 years ago by bryanlyman
1 646 posted 14 years ago by iaian7
0 689 posted 14 years ago by tm
1 793 posted 14 years ago by giak
0 694 posted 14 years ago by giak
1 514 posted 14 years ago by giak
0 838 posted 14 years ago by giak
remove and item or items from array
0 430 posted 14 years ago by edektor
0 651 posted 14 years ago by unravelme1
This is a class/demonstration for creating dynamic properties and storing them in an array
1 535 posted 14 years ago by mpcircuitry
This function checks to see if two arrays are equal
1 656 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 638 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 523 posted 14 years ago by iloveitaly
0 473 posted 14 years ago by boondoklife
0 511 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 808 posted 14 years ago by webonomic
2 652 posted 14 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 659 posted 14 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 765 posted 14 years ago by leonelsantos
A function i made for running trim on all elements in an array
1 789 posted 14 years ago by Knarf
1 579 posted 14 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 543 posted 14 years ago by arunpjohny
This function is add 'each' function to the javascript Array object.
1 473 posted 14 years ago by arunpjohny
Create log.txt in scripts directory and set permissions to 0666 before use.
0 610 posted 14 years ago by Nek
1 ... 6 7 8 9 10 ... 13