lundi 25 octobre 2021

Check if even one value differs in a Php array

So I have an array of seller ids for ex :

Sellers ( [0] => 1 [1] => 10 )

If incase there were many sellers like hundreds, how do I check if there's (atleast 2) different sellers in the array ? Basically I can't have 2 different seller ids in that array. and if thats the case it should print : "More than 1 seller".

Aucun commentaire:

Enregistrer un commentaire