Jump to content

[SOLVED] Redefining a variable in an array


alconebay

Recommended Posts

I just starting using arrays and I don't understand why this is not working:

 

if ($user['gender']=="m") {$user['gender']=="Male";}

 

I'm using that if statement (and an else statement for "Female". Not shown) in a loop and the statement is being read but "$user['gender']" still outputs "m" instead of "Male".

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.