How to insert a variable into an array?

How to insert a variable in this array?
$postData2 = array(
 'TITLE' => $leadData['TITLE'],
 'NAME' => $leadData['NAME'],
 'COMMENTS' => $leadData['COMMENTS'],
 'ADDRESS' => $leadData['ADDRESS'],
 'PHONE_MOBILE' => $leadData['PHONE_MOBILE'],
 'EMAIL_WORK' => $leadData['EMAIL_WORK'],
 VARIABLE => $leadData[VARIABLE],
 );

Sorry for the stupid question)
July 8th 19 at 12:10
2 answers
July 8th 19 at 12:12
Solution
$arr = array(
$key => $arr2[$key];
);

$arr[$key] = $arr2[$key];
I m stupid) Thanks - carleton commented on July 8th 19 at 12:15
July 8th 19 at 12:14
$postData2['VARIABLE'] = $leadData['VARIABLE'];

Find more questions by tags PHP