Código html:
$( "#paises2" ).autocomplete({ source: "paises_lista.php" });
Código php:
<?php include_once 'conexionPDO.php'; $sql = "select * from country where country_id=-1"; $sql = "select country as value from country where country like '%" . $_GET["term"] . "%'"; $resul = $conn->query($sql); $paises = $resul->fetchAll(); echo json_encode($paises);