How to style PHP echo output with span

前端 未结 4 582
傲寒
傲寒 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:52

    Try this:

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

提交回复
热议问题