I have an array {$address = array(..........);
}
I have converted it like
{
foreach ($address as $key => $val){
$points[] = "['{$val}', '{$val}']";
}
$output = join ("," , $points);
$req_format = strip_tags($output);
}
which outputs: ['30 South Wacker Drive Floor 22 Chicago IL 60606 ', '30 South Wacker Drive Floor 22 Chicago IL 60606 '],['288 Bishopsgate London, EC2M 4QP United Kingdom ', '288 Bishopsgate London, EC2M 4QP United Kingdom '],['260 Madison Avenue 8th Floor New York NY 10016 ', '260 Madison Avenue 8th Floor New York NY 10016 ']
I need to assign this value to a js variable:
var locationsArray = [
['30 South Wacker Drive Floor 22 Chicago IL 60606', '30 South Wacker Drive Floor 22 Chicago IL 60606'],
['30 South Wacker Drive Floor 22 Chicago IL 60606', '30 South Wacker Drive Floor 22 Chicago IL 60606']
];
how can I assign php variable $req_format equal to js variable locationArray = [??????];