谁能帮我在PHP中显示设计html代码?

时间:2018-10-10 07:41:20

标签: php

我需要帮助,当我们使用echo时,下面的这段代码不会显示设计html ...任何人都可以提供帮助

$message = '<html><body>';
$message .= '<img src="https://innovationtours.net/wp-content/uploads/logo-v.png" alt="Website new Request" width="250px" height="250px"/>';
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= '<tr style="background: #eee;"><td><strong>Name:</strong> </td><td>" . "mohamed" ." ". "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Email:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Phone Number:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Country:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Tour Name:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Check In:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Check Out:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>Price:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '<tr><td><strong>The Message:</strong> </td><td>" . "mohamed" . "</td></tr>';
$message .= '</table>';
$message .= '</body></html>';
echo $message;

1 个答案:

答案 0 :(得分:1)

尝试使用双引号

$message = "<html><body>";
$message .= "<img src='https://innovationtours.net/wp-content/uploads/logo-v.png' alt='Website new Request' width='250px' height='250px'/>";
$message .= "<table rules='all' style='border-color: #666;' cellpadding='10'>";
$message .= "<tr style='background: #eee;'><td><strong>Name:</strong> </td><td>mohamed mohamed</td></tr>";
.....
.....
$message .= "</table>";
$message .= "</body></html>";
echo $message;

我的输出为

enter image description here