Closed harry-maulana closed 7 years ago
hi, I don't really understand what you're saying Can you explain what's the problem you're trying to solve?
my case, i want to save the id of value to billing_city, not name of city.. but id of city.. please help me sir
so, not string "City" or "Another City" or "City 3" or "City 4" which we save to database, but id of them.
i has try like this: $cities['XX'] = array( 'YYY' => array( '1' =>'City ', '2' => 'Another City' ), 'ZZZ' => array( '1' => 'City 3', '2' => 'City 4' ) );
or like this:
$cities['XX'] = array( 'YYY' => array( array('id' => '1', 'name' => 'City '), array('id' => '2', 'name' => 'Another City '), ), 'ZZZ' => array( array ('id' => '1', 'name' => 'City 3'), array('id' => '2', 'name' => 'City 4 '), ) );
but not work
i'm sorry for my english..
i fixed this.. thanks Mantis
hi Mantis..
how to allowing id adding id in our array, then we just store the id of value to database (billing_city).. not text value.
like here: var data = [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }];
from here:
$cities['XX'] = array( 'YYY' => array( 'City ', 'Another City' ), 'ZZZ' => array( 'City 3', 'City 4' ) );
thanks, best regard