Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

I have array values in php:

result as below:

Array ( [0] => Array ( [product_id] => 1 [name] => Key board [description] => Test [price] => 52 ) ) 


I want to display as table formate of above result?

how can I display as below formate using php?

----------------------------------------------
product id | name | description | price |
----------------------------------------------
1 | Key board | Test | 52 |
----------------------------------------------

thanks in advance........
Posted
Comments
enhzflep 24-Jul-13 7:04am    
By using php as it is intended.
Consider PHP a rough analog to an 'automated keyboard'. Create the html by hand first, then work out how to create the same using php. You'll need to look into code dealing with iterating array keys and their values. You'll also need to look at output methods. echo, print and printf all come to mind.

1 solution

Use google to search the answer before posting it here. This [LINK] will provide you the answer for your question.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900