Below is the example of my table.I know its bad ..some website provided data like this.I need to convert to some better format.
So I want to loop through all cells and get its respective title.
for example output should be like..
01001 - Dairy and Egg Products
01002 - Dairy and Egg Products
.
.
.
.
02001 - Spices and Herbs
02002 - Spices and Herbs
My code so Far in php , I am sorry I searched in stackoverflow and google I am unbale to find answer and I have no Idea how to do it.Some help is appreciated.
$qrelated= inputs("SELECT * FROM `table`");
while($row = $qrelated->fetch_assoc())
{
}
You can use a foreach
loop to print out each column heading and it's value for each row using something like this:
foreach($row as $key => $value) {
echo $value." - ".$key;
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments