我试着剪断我的绳子,把所有东西都拿走,直到你找到“”
$ret = $html->find('td[class="date"]');
$pole = array();
foreach ($ret as $pole) {
$datum[] = $pole->innertext; // getting text what i need from HTML(simple html dom)
}
echo "$datum[0]"; //output of this is: 04.07.2013 Film Europe
$text_arr = str_split($datum[0]); //string to array
foreach($text_arr as $x){
if($x==" ") break; //if find space stop!
echo $x;
}
我是 100% 我的代码是正确的,但是它不起作用, echo $x 什么都不做 :),就像那个变量中没有存储任何东西一样