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 -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -