This seems so easy but i cant figure it out
$users_emails = array(
'Spence' => '[email protected]',
'Matt' => '[email protected]',
'Marc' => '[email protected]',
'Adam' => '[email protected]',
'Paul' => '[email protected]');
I need to get the next element in the array but i cant figure it out... so for example
If i have
$users_emails['Spence']
I need to return [email protected] and if Its
$users_emails['Paul']
i need start from the top and return [email protected]
i tried this
$next_user = (next($users_emails["Spence"]));
and this also
($users_emails["Spence"] + 1 ) % count( $users_emails )
but they dont return what i am expecting