Jump to content

gender not working


Monkuar

Recommended Posts

$user['gender'] = ($user['gender'] == 1) ? 'Male' : '';
	$user['gender'] = ($user['gender'] == 2) ? 'Female' : '';
	$user['gender'] = ($user['gender'] == 3) ? 'Hermaphrodite' : '';

 

I echo out $user['gender'] and it doesn't show the values i put in the terny operator, but if I delete all that, and echo it out it echo's out "1" which is what I have selected, any idea?

 

do i have to use variables other than the mysql $user['gender'] ?

Link to comment
https://forums.phpfreaks.com/topic/257909-gender-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.