Fuzzy search array values

array:search(ARRAY $array, STRING $search_term) : ARRAY

array:search(['sunsed is awesome','sunsed rocks'],'rocks')
#=> [ 1 => "sunsed rocks" ]

# fuzzy search means it does not have to fully match the string
array:search(['sunsed is awesome','sunsed rocks'],'roocks')
#=> [ 1 => "sunsed rocks" ]

array:search(['sunsed is awesome','sunsed rocks','suns: nice2'],'suns:')
#=> [
#=>     2 => "suns: nice2",
#=>     0 => "sunsed is awesome",
#=>     1 => "sunsed rocks"
#=> ]

array:search([ 'yt2' => ['user' => 'sed 2'], 'xh2' => ['user' => 'amin']],'amin')
#=> [
#=>     "xh2" => [
#=>         "user" => "amin"
#=>     ]
#=> ]

Copyright ©2013-2022 SunSed®. All rights reserved.