Q: How can I assign a value to the php variable in html? I am definitely a newbie and have a starting point of 0. come and help me and use it on your own. & Lt; div & nbsp; align = "left" & gt; & nbsp; & lt; h1 & nbsp; align = "center" & gt; & amp; nbsp; & lt; New Q: how to assign the php variable to html?
I am definitely a Cainiao. it's a starting point. come and help me with it. you can use it on your own.
Put a variable $ data here
... Connect to the database
$ Data = xxx
?>
How to assign the results of the subsequent database to him.
------ Solution --------------------
... Connect to the database
$ Data = xxx
?>
Let's use a smarty program and a template to separate it.
------ Solution --------------------
... Connect to the database
$ Result = mysql_query ($ SQL );
?>
While ($ data = mysql_fetch_assoc ($ res )){
?>
Put a variable here
}
?>
The approximate format is as follows: