I want to loop an array variable in a for-each loop or any other way you suggest . and when looping if an array has two or more identical items/values the loop should skip the data and continue in with the next data .
$users = array ( array('user1', id , email),
array('user2', id , email),
array('user3', id , email),
array('user4', id , email)
foreach ($users as $key) {
// do something for each user
// if from arrays user1 , user2 , user3 , user4 there are some identical data ..
// skip that user and continue with another user
// then return results and number of users skipped
}
Example :
if in array $users user1 has an email address/id same as user3 skip user3 and continue with user4
Hope you have got my point as I'm not so good in English
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…