Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们有文本变量:
$text = 'I use something similar to pull the most recent post from my blog and display a snapshot of it on my home page.';
如何去除此文本的前 40 个符号?(包括空格)。
应该像这样工作:
echo strip_text($text, 40);
谢谢。
与substr:
substr
echo substr($text, 40);
使用 PHP 的substr:
$stripped = substr($text, 0, 40);
我有一个<table>我想要一个包含其子项的宽度<td>。
<table>
<td>
不幸的是,我只能将类分配给<td>列,而不是<th>列 - 所以我不能table-layout: fixed像往常一样使用。w3 表格布局规范
<th>
table-layout: fixed