<?php
include("/var/www/2a685b61-ba1a-4056-abd9-0883231735ff/public_html/monzaclube/config.php");
$conecta = new mysqli(BD_HOST,BD_USUARIO,BD_SENHA,BD_BANCO);

$i = 1;
$sql = $conecta->query("SELECT * FROM carrocerias ORDER BY id ASC");
while ($consulta = $sql->fetch_assoc()){
$evNum = 'motor_'.$i;
$motor[$evNum]['id'] = $consulta['id'];
$motor[$evNum]['descricao'] = $consulta['descricao'];
$i = $i + 1;}

$json_string = json_encode($motor);

echo $json_string;
?>