finding similarities in array
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
finding similarities in array
is there a way to use the awesome mysql LIKE function on arrays in php? i need to find elements of an array that are going to be simmilar to eachother
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
there isn't an efficient way.. but you can make your own in php fairly easily... hint: strtolower()
strstr()
Take a look at chapter on array functions in php manual.
f.e. array_filter, usort, array_walk. Using these functions + some regexps you're certainly able to implement LIKE and alike in php
f.e. array_filter, usort, array_walk. Using these functions + some regexps you're certainly able to implement LIKE and alike in php