Jump to content

Recommended Posts

Posted

How to get fullname of country, state? eg

State: Norborg

Country: Singapore

 

<?php	echo (!empty($contact->city) ? $this->Html->_($contact->city, true). "":""); ?>
<?php	echo (!empty($contact->state) ? $this->Html->_($contact->state, true). "":""); ?> 

I try but not work
<?php   echo (!empty($contact->country->alpha3) ? $this->Html->_($contact->country->alpha3, true). "":""); ?>

 

Tanks very much for help me :)

Posted

The data available depends on the controller and what it retrieves. For individual contacts, only the 2-character state and country are available (i.e. what is stored with the contact). If you need more information, such as additional information on the state/country based on those 2-character state/country codes, then you would need to fetch them separately from the States and Countries models.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...