+ 12
I want create a table with echo function in PHP?
3 Answers
+ 2
From my experience of PHP, you can retrieve values from a table using Mysql query and then echo the values of the table as rows..
Use: $query = "SELECT something FROM table";
$result = mysql_query($query);
then the rows can be echoed using the while loop:
while ($row = mysql_fetch_assoc($result)) {
echo"$row['something']";
}
Hope that helped..
+ 1
echo can create a table passing as a parameter html code
echo('<table ...'), you can combine code php in the parameters echo use ' and " .
to call the function use isset and get or post you can see examples on internet.
Sorry for my english :-D
0
echo outputs text or html, not SQL. thus the only type of table you can make with echo is an html table