- print_r: documentation ( source)
<?php
$array1 = Array
(
'recipients' => Array
(
'signers' => Array
(
'0' => Array
(
'email' => 'rm@gmail.com',
'tabs' => Array
(
'checkboxTabs' => Array
(
'0' => Array
(
'tabLabel' => 'sampleCheckbox'
)
),
'textTabs' => Array
(
'0' => Array
(
'tabLabel' => 'CompanyName',
'value' => 'Qwerty'
),
'1' => Array
(
'tabLabel' => 'TradingName',
'value' => 'Qwerty'
),
'2' => Array
(
'tabLabel' => 'ContactName',
'value' => 'RM'
)
)
)
)
)
)
);
$monthlytotal = 10; // i assume
$array2 = array(
"tabLabel"=>"MonthlyTotal",
"value"=>$monthlytotal
);
$array1['recipients']['signers']['0']['tabs']['textTabs'][] = $array2;
print_r($array1);