I\'m building a website that contains users with user profiles. Many of the fields in the profile are optional.
There is an opportunity for a lot of user-generate
Somewhat less readable, but effective):
list($idx,$name) = array_shift(array_filter(array( $names['display_name'], implode(' ',array_filter(array($names['first_name'],$names['last_name']))), 'user'.$names['id']; )));