Ok, I see you like it, I have another one.
Same situation have code piece:
function getAdminName()
{
global $admin;
return ($admin['gender'] ? 'Mr' : 'Mrs').' '.$admin['fullname'];
}
and simple question:
"This code isn't ideal. Explain what the problem is and what you could do to fix it"
it's all, please help! Today I have no idea what's wrong except this is creepy realization and I do this in totally another way.
P.S. ginerjm asking what is it, this is a part of practical tasks of technical php test and I trying do my best to solve it, but even if I fail on exam I need to understand what's it about.
All this about: "You need to think globally, we need to see how you think."
And like Ross Geller's little hand monkey, but in my head, beating in cymbals plates, with deep understanding of this code problem eyes look.
Thanks for help!