Reputation: 875
Instead of restating the parent variable inside itself ($username
), is there some other way to do it?
$username = ($profile_is_admin == true) ? $username . $admin_symbol : $username;
Upvotes: 0
Views: 69
Reputation: 3185
Try this?
$username .= ($profile_is_admin) ? $admin_symbol : '';
Upvotes: 3
Reputation: 1805
Like this
$username .= ($profile_is_admin == true) ? $admin_symbol : '';
Upvotes: 1