Ideas for importing text data using PHP array functions

I am new to php and ask for help in some encodings. I have little experience with php, and I went to php.net and read a couple of books to get some ideas on how to complete this task.

It seems that there are many features, and I am confused by what would be the best fit. (i.e. fgetcsv, explode (), regex ??) to extract data to a file. THEN I need help printing / displaying this information in an orderly manner.

Here is what I need to do:

  • import, read the txt file, which (see sample)

Attributes are not always ordered, and some records have missing attributes.

  • Dynamically create a web spreadsheet (html) to represent this data

Examples of entries:

attribute1=value;attribute2=value;attribute3=value;attribute4=value;
attribute1=value;attribute2=value;attribute4=value;
attribute1=value;attribute2=value;attribute3=value;

? ? , ? ? , , .

+3
2

, , .

file(), foreach() explode(), , ;

, , , . , , , .

!

+4

file(), ​​ . , , ';', '='.

0

Source: https://habr.com/ru/post/1759589/


All Articles