How to add a new condition that array?

0 like 0 dislike
131 views
Hello! There are avatars on a crutch:
'bigAva' => ($users['sex'] == m ? 'https://test.aquaworldonline.ru/img/avatars/full/m.png' : 'https://aquaworldonline.ru/img/avatars/full/f.png')


If gender is m, then exhibited male avatar, otherwise female. This topic is not very good to work with arrays not know how. How can I add the third condition? If $user['id'] == 683 ? 'https://aquaworldonline.ru/img/avatars/full/adm.png'. Knowledgeable, please help!
by | 131 views

3 Answers

0 like 0 dislike
by
0 like 0 dislike
supposedly this is possible:

if($user['id'] == 683) { $avatar = 'https://aquaworldonline.ru/img/avatars/full/adm.png'; } else if($users['sex'] == 'm') { $avatar = 'https://test.aquaworldonline.ru/img/avatars/full/m.png'; } else { $avatar = 'https://aquaworldonline.ru/img/avatars/full/f.png'; } ... 'bigAva' => $avatar ....
by
0 like 0 dislike
by

Related questions

0 like 0 dislike
3 answers
asked Sep 1, 2019 by manavar_g
0 like 0 dislike
3 answers
asked Jul 15, 2019 by manavar_g
0 like 0 dislike
3 answers
asked Jul 13, 2019 by manavar_g
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users