I run the following to get an array of customs_port_id, among other info:
$this->data['port_datas_selects'] = $this->MH_customs_port_model->customs_port_read($customs_id);
The above returns the following array:
Array (
[0] => Array (
[customs_port_pk] => 35
[customs_port_id] => 735
[customs_id] => 19
)
[1] => Array (
[customs_port_pk] => 36
[customs_port_id] => 732
[customs_id] => 19
)
)
The array length is unknown. How can I put customs_port_id into a simple array like (735,732)?
I tried something like this but it just returns the last customs_id.
$x = array();
foreach ($this->data['port_datas_selects'] as $port_datas_select) {
$x += array($port_datas_select['customs_port_id']);
}
print_r($x);
The above returns:
Array ( [0] => 735 )
I also tried .= instead of += but doesn't work.