Explorar o código

add /car/index.php to show cars' details

lionared %!s(int64=7) %!d(string=hai) anos
pai
achega
00e54ee61c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      car/index.php

+ 2 - 2
car/index.php

@@ -14,7 +14,7 @@ $file_path = BASE_PATH. '/data/car/data_audi.csv';
 $importer = new car_convert\importer($file_path);
 $importer->init_alias('audi');
 $base_infos = $importer->get_data('base_info');
-$header = $importer->get_header();
+$headers = $importer->get_header();
 $type_name = "奥迪A6L 2017款 TFSI 技术型";
 $car = [];
 
@@ -66,7 +66,7 @@ if($id !== false) {
 </div>
 <table class="table table-bordered">
     <?php
-        foreach ($header as $key=>$item) {
+        foreach ($headers as $key=>$item) {
     ?>
             <tr>
                 <td class="col-md-4"><?php echo $item; ?></td>