Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

function _state_list() { $list = array(


custodian

Recommended Posts

I've been enhancing my payment module an would like to add a default

 

This is what I'm trying to accomlish

 

function _state_list() {

$list = array('ALABAMA' => 'AL' ,

'ALASKA' => 'AK' ,

'AMERICAN SAMOA' => 'AS' ,

'ARIZONA' => 'AZ'

...blah bla blah...

...blah bla blah...

...blah bla blah...

...blah bla blah...

...blah bla blah...

...blah bla blah...

'SASKATCHEWAN' => 'NON-US' ,

'YUKON' => 'NON-US');

 

 

return $list;

}

 

Ideally what I would like to that anything that does not match the US states to automatically assign NON-US as the state.

 

Currrently all I have Canada manually defined to identify the values in the array, but wish to trim down the code and allow it to be absolute in it's International ability. Hence anything not listed would be assigned Non-US.

 

I've googled a few times, though it seems google doesn't like someone searching fo =>, "=>" or [=>] or any other varation... Yahoo returned a few examples, but nothing showing how to properly assign a default catch-all.

 

Any help/examples would be appreciated.

My Contributions

 

Henry Smith

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...