【发布时间】:2013-07-22 22:18:27
【问题描述】:
我试着剪断我的绳子,把所有东西都拿走,直到你找到“”
$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 什么都不做 :),就像那个变量中没有存储任何东西一样
【问题讨论】:
-
I was 100% my code is right, but its not workingmmm 是的,我以前听说过。 -
为我工作:codepad.viper-7.com/kIE3bU 不是我会这样做