【问题标题】:How show that text as a table [closed]如何将该文本显示为表格[关闭]
【发布时间】:2013-05-27 00:19:34
【问题描述】:

如何将其显示为表格?

我的意思是如何在表格中显示“导演:”和结果?

echo '<strong>IMDb ID: </strong><a class="movie" href="http://www.imdb.com/title/tt'.$results['imdbid'].'" target="_blank">';
echo ''.$results['imdbid'].'</a><br>';
echo '<strong>Director: </strong>'.$results['director'].'.<br>';
echo '<strong>Cast: </strong>'.$results['lead'].', '.$results['cast'].'.<br>';
echo '<strong>Genre: </strong>'.$results['genre'].'.<br>';
echo '<strong>Country: </strong>'.$results['country'].'.<br>';
echo '<strong>Runtime: </strong>'.$results['runtime'].' min.<br>';
echo '<strong>Medium: </strong>'.$results['disctype'].'.<br>';
echo '<strong>IMDb Rating: </strong>'.$results['imdbrating'].'.<br>';
echo '<strong>Rating: </strong>'.$results['personalrating'].'.<br><br>';
echo '<strong>Synopsis:<br></strong>'.$results['synopsis'].'<br>';
echo '</div><br>';

【问题讨论】:

  • 你的问题太模糊了
  • 更改 HTML 以使用表格。
  • 添加 &lt;table&gt; 和其余的 html 标记

标签: php html tabular


【解决方案1】:

你的意思是这样的吗?我能想到的唯一一件事就是你的绝对和极端的问题......

<?php
echo '<table border="1px">';
echo '<tr><td><strong>IMDb ID: </strong></td><td><a class="movie" href="http://www.imdb.com/title/tt'.$results['imdbid'].'" target="_blank"><td></tr>';
echo '<tr>'.$results['imdbid'].'</a></tr>';
echo '<tr><td><strong>Director: </strong></td><td>'.$results['director'].'.</td></tr>';
echo '<tr><td><strong>Cast: </strong></td><td>'.$results['lead'].', '.$results['cast'].'.</td></tr>';
echo '<tr><td><strong>Genre: </strong></td><td>'.$results['genre'].'.</td></tr>';
echo '<tr><td><strong>Country: </strong></td><td>'.$results['country'].'.</td></tr>';
echo '<tr><td><strong>Runtime: </strong></td><td>'.$results['runtime'].' min.</td></tr>';
echo '<tr><td><strong>Medium: </strong></td><td>'.$results['disctype'].'.</td></tr>';
echo '<tr><td><strong>IMDb Rating: </strong></td><td>'.$results['imdbrating'].'.</td></tr>';
echo '<tr><td><strong>Rating: </strong></td><td>'.$results['personalrating'].'.<br></td></tr>';
echo '<tr><td><strong>Synopsis:</strong></td><td>'.$results['synopsis'].' </td></tr>';
echo '</table>';
?>

【讨论】:

    猜你喜欢
    • 2013-11-14
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 2011-07-04
    • 2018-11-04
    • 1970-01-01
    • 2013-09-15
    • 1970-01-01
    相关资源
    最近更新 更多