php - How do you style comments after they are pulled out of a database? -


You can post a comment on my website, but I'm sure how they should use CSS. I remember reading about the use of ul and lee tags, but I can not understand it. I want everyone to have a border, background color, etc. Here is the PHP:

  $ query = Select from "Select"; $ Result = mysql_query ($ query); $ Num = mysql_numrows ($ Result); Mysql_close (); Echo "& lt; h4 & gt; & lt; center & gt; run it. & Lt; / center & gt; & lt; / h4 & gt;"; $ I = 0; While ($ i & lt; $ num) {$ name = mysql_result ($ result, $ num - $ i, "message"); "$ Name & lt; br & gt;" Echo; $ I ++; }  

I'm trying to figure out how to code this so that I can replace the with "$ name
";
and therefore my comment style with CSS.

two:

  resonant '& lt; Ul class = "comments" & gt; '; ($ Name = mysql_result ($ result, $ num - $ i, "message"); echo "
  • for $ i = 0; $ i & lt; $ num; $ i ++) $ Name & lt; / li & gt; ";} resonance '& lt; / ul & gt;';
  • Then you can style with this CSS:

    >
      >
        >
            >
              Because I suspect you want the default.

              Alternatively, you can simply

                and and
              • ; and
              • class = "comment" & gt;


    Comments