I have a little problem:
<?php
require_once '../Controlador/HuespedController.php';
$Huesped = new HuespedController;
$userdoc = '44889498'; //originalmente aqui va esto $_POST['doc'],
$consulta = $Huesped->BuscarDocumento($userdoc);// se llama a la funcion
print_r($consulta);
?>
This code serves very well the problem is that this query to the bd returns an array that is the following:
Array ([0] => Array ([clicod] = > 1 [tpcli] = > Principal2 [country] = > 51Peru [doctp] = > DNI [doc] = > 44889498 [docexp] = > 2018-07-08 [name] = > Augusto [lastname] = > Pruebita [email] = > [email protected] [phone] = > 999569041 [address] = > Urb. Villa Flores))
How can I pass this to the jquery, and tried with $ .post (), but giving me a tremendous array is very complicated, is there a more effective way to pass it?.
psdt: e seen that some use Json_encode (), but I do not know how to use it and how to pass it to the jquery.
Thank you very much for taking the time to read my question posted, I thank you very much for sharing my knowledge.