I am trying to change source data of my autocomplete JQuery but i can't understand what kind of array i have to send in PHP at my JS function because i use this to change source data :
$( "#autocomplete" ).autocomplete('option', 'source', tab);
and i send this result to my JS function :
{"transport":{"voiture":"voiture","car":"car","avion":"avion"}}
my php for this result :
foreach ($result as $k => $v) {
//Stockage des valeurs dans un tableau associatif
$listtransport[$v['transport']] = $v['transport'];
}
Thanks in advance !