skip to Main Content

How to search for word in array of slugs – PHP

I have an array of locations slugs and a sentence that might have one of the locations. So I want to get the location in the sentence from the locations array $areas = 'garki-i,garki-ii,yaba,wuse-i,asokoro,maitama,jabi,jahi,dutse,gwarinpa,central-business-district,kubwa,lugbe,kaura,gudu,banana-island,new-karu,old-karu,kugbo,eko-atlantic,nyanya,mararaba,madalla,kuje,wuse-ii,utako,oulfa,kimunyu,ibara,cfc,joska,kabati,juja'; $a_arr = explode(',', $areas); $tweet =…

VIEW QUESTION
Back To Top
Search