<td class="cinetime">
<div>Screen: 3</div>
<br clear="all">
<span>1:00</span>
<span>11:00</span>
<span>13:00</span>
<span>15:00</span>
<br clear="all">
<div>Screen: 4</div>
<br clear="all">
<span>12:05</span>
<span>14:05</span>
<span>16:05</span>
<span>18:05</span>
<span>20:05</span>
<div>Screen: 3 (3D)</div>
</td>
以上是我正在编写的 HTML。
我想分别<span>
为屏幕 3和屏幕 4获取数据。
这是我下面的代码,但它从所有<span>
s中获取数据
foreach($cinema->find("td.cinetime span") as $times) {
echo $times->plaintext;
}