Possible Duplicate:
How to select rows that start with “<img” with an IF statement
我正试图在行文开始之前加上“/希望”。 这给我留下了一个错误。
while($row = mysql_fetch_array( $result3 )) {
echo "<div class= entry >";
$images = (substr($row[ text_image ]), 0, 3) == img ) ? "/images" : "";
echo $images . $row[ text_image ];
echo "</div>";
}