How to style PHP echo output with span

前端 未结 4 588
傲寒
傲寒 2021-01-23 16:32

I\'m trying to style the output of each echo.

Ideally I\'d like to use for each echo, but I\'m not too sure how to ach

4条回答
  •  余生分开走
    2021-01-23 16:48

    $result = mysql_query("SELECT * FROM Blog");
    while($row = mysql_fetch_array($result))
        {
        echo "$row['Date']";
        echo "$row['Title']";
        echo "$row['Message']";
        echo "";
        }
    
    mysql_close($con);
    

    or, much nicer, in a table:

    $result = mysql_query("SELECT * FROM Blog");
    echo ""
    while($row = mysql_fetch_array($result))  {
        echo ""
        echo "";
        echo "";
        echo "";
        echo "";
        echo ""
    }
    echo "
    $row['Date']$row['Title']$row['Message']
    " mysql_close($con);

    You then can style each row and column with a class.

提交回复
热议问题