mercredi 27 mai 2020

Get the word from sentence that match to an array PHP

Currently I have this variable in php

   @if(count($label_types) > 0)
   @foreach ($label_types as $label_type)
      @if($label_type)
        
      @endif
   @endforeach
   @endif

Which contains the following rows

Waterproof (This is waterproof)

Glossy

Normal

Now since waterproof has the (This is waterproof) on the records

Now I want to only return the words that matches with these keywords

waterproof, glossy, normal

whether they are uppercases, lowercases

For example if the case is : waterproofss with double s

the return would be waterproof



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2M4y10D
via IFTTT

Aucun commentaire:

Enregistrer un commentaire