I have an array that has some data that looks like this
$valueOptions = array(
'order_shipping_data_firstname' => Mage::helper('orders2csv')->__('order shipping firstname'),
'order_shipping_data_lastname' => Mage::helper('orders2csv')->__('order shipping lastname'),
'order_shipping_data_region' => Mage::helper('orders2csv')->__('order shipping region'),
'order_shipping_data_street' => Mage::helper('orders2csv')->__('order shipping street'),
'order_shipping_data_city' => Mage::helper('orders2csv')->__('order shipping city')
);
I need to combine the firstname and last name fields but can't figure out a solution. This is the only file in the module that references anything lastname / first name / name so it's calling it externally from within the magento framework. Ideally they would be stored in variables and I could just combine them $fullname = $first . $last etc but this won't work in arrays.
I don't understand the usage of =>
too well but I know if I edit the right hand side and make this : => Mage::helper('orders2csv')->__('order shipping fullname')
the option will appear where I want (in a dropdown), so I guess I'm trying to combine 'order_shipping_data_firstname'&'order_shipping_data_lastname'
and put it before this, but within the array?
I've also tried starting another array in a variable and inserting the variable in the valueOptions array but this broke.
$foo = array(
'bar' => array(
"hello",
"world"
),
);
var_dump($foo);
array nested in array
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With