sql, php, html table question -


i want grab data mysql database using php. data looks this:

apple 3 orange 2 banana 4 

i want take data , put in html table , use css make pretty, dont want deal inside <?php ?>

after grab

$result = mysql_query("select * table");

can reference result variable outside <? php ?> tags?

no. php can done in <?php ... ?> or <?= ... ?>. use template engine such smarty if want substitution in manner.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -