Welcome To Snipplr
Everyone's Recent Snippets Tagged array
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
hope you enjoy - thanks to Tom Duff (for implementation in C), Dean Edwards, and Nicholas Zakas for the idea
0
595
posted 15 years ago by jschilling
Remove item (number or string) from array, using jQuery (method grep).
3
13665
posted 15 years ago by gustavopaes
Instead of one element you can insert multiple at once:
array($element1, $element2, $element3)
1
1083
posted 15 years ago by kurokikaze
this function tells you whether or not the passed value is in the passed array
1
899
posted 15 years ago by jlvallelonga
Use the colon : modifier to build an array.
The colon is like a wildcard. In this case, anything that starts with ash.
SAS Arrays hold variable names which can be used during tedious procedures such as conditional loops.
0
1030
posted 15 years ago by webonomic
In this case I'm looking for image sources in html and placing them in array.
1
897
posted 15 years ago by leonbda
Usage:
define('PIRATE',bindec('0001')); // 1
define('NINJA',bindec('0010')); // 2
define('JEDI',bindec('0100')); // 4
define('ADMIN',bindec('1000')); // 8
$rpermit = array(PIRATE,JEDI); // Equivilent Flags '0101'...
0
497
posted 15 years ago by Jdub7
very easy to use pagination class, see website for comments
1
1674
posted 16 years ago by localhorst
remove(array) --> array
Array.remove(a) simply removes all the items in the passed in array from the current scope array. Good for bulk operations.
0
779
posted 16 years ago by kouphax
You can find a string as an array row value.
Ex:
arr=['abcde','mdleo']
arr.find('dbd') -> array['abcde']
arr.find('akdowewo') -> array[] (empty)
0
952
posted 16 years ago by tonic
Pre-selects an html form with a requested value... ie; editing a form from a database
0
762
posted 16 years ago by davidsword