Skip to content
Advertisement

array_unique() not working while I use preg_match_all php

my code is :

JavaScript

why out put is stil duplicated ? out put is:

JavaScript

not diffrent between using array_unique and not use it .

Advertisement

Answer

Because preg match output is like

JavaScript

so use zero index in unique

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement