Skip to content
Advertisement

Tag: loops

How do I display a row once inside a looped rows using php?

I have a problem on displaying a row once inside a looped rows using PHP. Here is the exact code that I have: Figure 1 ` ` This line have a row containing a label “Material” from this photo This Materials should not repeat on the looped contents. On this code below based on figure 1 above this post This

How can I show subcategories in categories?

Here’s the code: I will like to display parent category and its children under it. Something like this: Category Sub 1 Sub 2 Category – Sub 1 – Sub 2 I want to show data like see demo Database Structure. Both categories and subcategories are in same table. Database Answer Try this: Output:

creating multiple csv files from php loop

Im trying to create a loop that when executed it created multiple csv files and downloads them. This is my code: Currently the loop created 1 CSV with a new header and the department details below it like this I want the loop to create a new CSV for each department but its just not working for me. Any help

Advertisement