PHP processes CSV tables, using fgetcsv and fputcsv to convert between arrays and CSV
Array <= fgetcsv | fputcsv => csv
To edit an online Excel table, parsing the Excel xls file format is a problem. after all, this is the private patent format of Microsoft Office.
To do this, use the common csv (Comma Separated Value, Comma-Separated Value) format.
Various office software can recognize csv tables, which are actually tables separated by specific delimiters (such as commas.
For PHP, fgetcsv reads the csv table and returns an array,
Then foreach outputs
In this step, several lines of code can be implemented, which is very simple.The workload mainly lies in the browser front-end. we recommend that you use jQuery to perform DOM and AJAX operations,To achieve fine-grained double-click cell editing like phpMyAdmin, it is not difficult to submit AJAX,Or $ ("form"). serialize () once the entire table is written, and AJAX can also be submitted. CSV table rules:1. separate the content of cells in each row with commas.2. if the content of a cell contains a comma, the content of the cell will be enclosed in quotation marks.3. if the content of a cell contains quotation marks:The quotation marks are not at the beginning or end, and the content of this cell is not included in the quotation marks.The content of this cell is enclosed in quotation marks at the beginning or end, and the original quotation marks at the beginning and end are escaped.