日期:2014-05-17 浏览次数:20475 次
public function match_stuff($content){
$artlist = pq('.stepcont');
foreach($artlist as $li){
$stuff[] -> approved = pq($li)->find('p')->text();
if($stuff){
$stuff[] -> kkli = pq($li)->find('a img')->attr('src');
}}
return $stuff;
}
[
{
"approved": "wwwwwww"
},
{
"kkli": "33333333333333"
},
{
"approved": "444444444444444"
},
{
"kkli": "55555555555"
},
{
"approved": "6666666666"
},
{
"kkli": "7777777777777777"
},
{
"approved": "88888888888"
},
{
"kkli": "999999999999"
},
{
"approved": "0000000000000"
},
{
"kkli": "111111111111111"
},
]
[
{
"approved": "wwwwwww","kkli": "33333333333333"
},
{
"approved": "444444444444444","kkli": "55555555555"
},
{
"approved": "6666666666","kkli": "7777777777777777"
},
{
"approved": "88888888888","kkli": "999999999999"
},
{
"approved": "0000000000000","kkli": "111111111111111"
},
]
$artlist = pq('.stepcont');
foreach($artlist as $li){
$stuff[] = array(
'approved' => pq($li)->find('p')->text(),
'kkli' => pq($li)->find('a img')->attr('src')
);
}
return $stuff;