<?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
);
array_push($array1['recipients']['signers']['0']['tabs']['textTabs'], $array2);
print_r($array1);
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
- 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
)
[3] => Array
(
[tabLabel] => MonthlyTotal
[value] => 10
)
)
)
)
)
)
)
preferences:
92.04 ms | 417 KiB | 5 Q