I would like to check if all the values in my array are the same and I did it as follows:
$minha_lista = array('a','a','a');
if(!empty($minha_lista)) {
if(count(array_unique($minha_lista))===1){
return true;
} else { return false; }
}
Unfortunately I can not get the result you want.
Is there another way to proceed?