PHP get words with length longer than 3 from string -


is there function can cut words string small length e.g. "the, and, you, me, or" these short words common in sentences. want use function fill fulltext search criteria

before method:

$fulltext = "there ongoing work on creating formal php specification."; 

outcome:

$fulltext_method_solution = "there ongoing work creating formal specification." 

$fulltext = "there ongoing work on creating formal php specification.";  $words = array_filter(explode(' ', $fulltext), function($val){              return strlen($val) > 3; // filter words having length > 3 in array          });  $fulltext_method_solution = implode(' ', $words); // join words sentence 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -