vendredi 2 octobre 2020

How to create csv header and write to its column with checkbox statement

i have a foreach loop which parse some data: phone number, first name, last name. What i'm trying to do is to write this data to csv file depending on user preferences. Phone number is required header which writes data anyway, for two others i want to make user preference decide what to write with checkboxes, like this

              if (checkBox1) if (checkBox2)
phone number | first name   |  last name   |
     123     |     foo      |     bar      |

I have no problems writing phone header and column but when it comes to checkboxes things become messy. I will be grateful for any help




Aucun commentaire:

Enregistrer un commentaire