What is best way to save user's country-code, country-name, state-code, state-name, and city?

What is best way to save user's country-code, country-name, state-code, state-name, and city?
Seems location metadata is not enough for that.

  • What is wrong with metadata?

    $user->city = 'Miami';

    $user->state = 'Florida';

    $user->state_code = 'FL';

    $user->country = 'United States';

    $user->country_code = "US",

    etc.

  • Thanks @Beck24.

    No wrong with metadata, and actually, I did that, but with different way :

    $user->userLocation = array ('Miami', 'Florida', 'FL', 'United States', 'US');

    Well, I think yours is better.

    Regards.

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.