PHP Classes

PHP Array Search: Search for patterns in arrays using wildcards

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,051 All time: 3,521 This week: 44Up
Version License PHP version Categories
php-array-search 1.0.0BSD License5.0PHP 5, Data types
Description 

Author

This class can search values in arrays with support to wildcards.

It can traverse arrays to search for given keyword either on the array values or even on the array keys.

The search keywords can be patterns that may use the % wildcard. The search can be for keywords that may be in the beginning, middle, end or any other combination of keyword values and wildcards.

Innovation Award
PHP Programming Innovation award nominee
September 2012
Number 2


Prize: One downloadable copy of PhpED Professional
PHP provides means to search for values in an array but it can only find values that match exactly the searched value.

This class provides a more flexible solution that can search for patterns in array values or array keys.

It supports wildcards to define the search pattern in a similar way to SQL LIKE clauses.

Manuel Lemos
Picture of ALPESHKUMAR B PANCHAL
  Performance   Level  
Innovation award
Innovation award
Nominee: 1x

 

  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file array-search-example.php Example Example file
Plain text file array-search-class.php Class Main class file

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,051
This week:0
All time:3,521
This week:44Up