return $arreglo; } else { return array(); } } public function getListasArea($arr) { //$this->setValue("areasoporte",$arr["direccion"]); $arreglo = $this->devuelve_filas_indexlabel("area", "id, nombre"); if (is_array($arreglo)) { return $arreglo; } else { return array(); } } } $autocomplete = new ClassUnidades(); if ($_POST['send'] == "unidad") { $unidad_array = $autocomplete->getListas(); exit(json_encode($unidad_array)); } else { if ($_POST['send'] == "tipo") { $tipo_array = $autocomplete->getListasTipo(); exit(json_encode($tipo_array)); } else { if ($_POST['send'] == "marca") { $marca_array = $autocomplete->getListasMarca(); exit(json_encode($marca_array)); } } }
function getListaUnidades($arr) { $unidades = new ClassUnidades(); return $unidades->getListas($arr); return $unidades; }