Jump to content

Filters and equation on csv file


a1triumph

Recommended Posts

I'm just trying to get to grips with PHP it looks very flexible but still on the basics!

What I'm trying to do is I have two columns on a csv file, the first represents a destination and the second the number of places booked.

Basically as someone sends a form with their booking details these two fields are dropped onto a csv file.

What I want to achieve is to interrogate the csv file for a particular destination - say Spain and get a total number of places booked - ideally subtracting that figure from the total number of places available.

 

The end result would be an availability button on the associated "destination" page showing available places to that destination

 

I could probably do this using MySQL but as there are only ever around 8 destinations available at any time I thought that a CSV file was simplest.

I have managed to get the CSV into an alphabetical table format but I'm stuck now as to what to do next

Can someone point me in the right direction - do I have to use an array?

 

 

Many thanks

 

Learning all the time!

???

Link to comment
https://forums.phpfreaks.com/topic/126356-filters-and-equation-on-csv-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.