嗨,我已经看过一个已经发布的关于这个的问题,并试图调整我的代码做一个类似的事情.基本上我在我的mysql数据库中有一个字段,其日期格式为yyyy-dd-mm我需要格式为dd-mm-yyyy.目前我的代码卡在线上echo "<td><strong> ("d/m/y",". $row['date'] .")</strong></td>";并读取此Parse错误:语法错误,意外的T_STRING,期待','或';'.不知道如何解决这个想法,我会很高兴.
$result = mysql_query("SELECT * FROM dbGigs WHERE CURDATE() < date ORDER BY date");
echo "<table class=\"gigs\">
<tr>
<th>Venue</th>
<th>Town</th>
<th>Date</th>
<th>Time</th>
<th>Status</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><strong>" . $row['venue'] . "</strong></td>";
echo "<td><strong>" . $row['town'] . "</strong></td>";
echo "<td><strong> ("d/m/y",". $row['date'] .")</strong></td>";
echo "<td><strong>" . $row['time'] . "</strong></td>";
echo "<td><strong>" . $row['status'] . "</strong></td>";
echo "</tr>";
Run Code Online (Sandbox Code Playgroud)