Php возвращаю массив в js (При отправке формы)
а js его не видит
cw89937.tmweb.ru
PHP :
<?php
if(isset($_GET['route'])) {
$name = $_POST['name'];
$phone = $_POST['phone'];
$adr = $_POST['adr2'];
$title = $_POST['title'];
$price = $_POST['price'];
$date = array('adr2' => $_POST['adr2'], 'name' => $_POST['name'], 'phone' => $_POST['phone'], 'price' => $_POST['price'], 'title' => $_POST['title']);
$array = array('name' => $_POST['name'], 'phone' => $_POST['phone'],'adr2' => $_POST['adr2'], 'date' => $date, 'message' => 'ok', 'name' => $name, 'phone' => $phone, 'price' => $price, 'title' => $title);
echo json_encode($array);
exit;
}
?>