PHP code example of bluem / searchstringparser

1. Go to this page and download the library: Download bluem/searchstringparser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bluem / searchstringparser example snippets


$search = new BlueM\SearchstringParser('Your AND string long OR short NOT "exclude this phrase" X');

$search->getAndTerms();     // array('your', 'string')
$search->getOrTerms();      // array('long', 'short')
$search->getNotTerms();     // array('exclude this phrase')
$search->getSkippedTerms(); // array('X')

$search = new BlueM\SearchstringParser('...', array('minlength' => 3));