I have this query:

```
SELECT  price.car_number1, car_from, car_to, car_fares
FROM    price, car
WHERE   car.car_number1 = price.car_number1

```

The output looks like this:

```
car_number1    car_from     car_date      car_fare
------------------------------------------------------
BAL2018        2013-01-21   2013-01-26    $555         
BAL2018        2013-01-27   2013-01-28    $111
BAL2019        2013-01-26   2013-01-27    $211 
BAL2020        2013-01-26   2013-01-27    $545

```

Now suppose use want at UI result of rates from `2013-01-21` to `2013-01-28`, I want to some or other way to print the price of each car for their respective date and incase if the car do not have fares assigned it should display as `N/A`. 

Please let me know if by anyway I can do this in mysql or anything with PHP

I want to make it look this (as in example)

```
           01-21   01-22 01-23 01-24 01-25  01-26 01-27 01-28 
 BAL2018   $555    $555  $555  $555  $555   $555  $111  $111
 BAL2019   N/A     N/A   N/A   N/A   N/A    $211  $211  N/A

```