基本的な質問をする
public function match_stuff($content){<br /> $artlist = pq('.stepcont');<br /> foreach($artlist as $li){<br /> $stuff[] -> approved = pq($li)->find('p')->text();<br /> if($stuff){<br /> $stuff[] -> kkli = pq($li)->find('a img')->attr('src');<br /> }}<br /> return $stuff;<br /> }
[<br /> {<br /> "approved": "wwwwwww"<br /> },<br /> {<br /> "kkli": "33333333333333"<br /> },<br /> {<br /> "approved": "444444444444444"<br /> },<br /> {<br /> "kkli": "55555555555"<br /> },<br /> {<br /> "approved": "6666666666"<br /> },<br /> {<br /> "kkli": "7777777777777777"<br /> },<br /> {<br /> "approved": "88888888888"<br /> },<br /> {<br /> "kkli": "999999999999"<br /> },<br /> {<br /> "approved": "0000000000000"<br /> },<br /> {<br /> "kkli": "111111111111111"<br /> },<br /> <br /> ]
[<br /> {<br /> "approved": "wwwwwww","kkli": "33333333333333"<br /> },<br /> <br /> {<br /> "approved": "444444444444444","kkli": "55555555555"<br /> },<br /> <br /> {<br /> "approved": "6666666666","kkli": "7777777777777777"<br /> },<br /> {<br /> "approved": "88888888888","kkli": "999999999999"<br /> },<br /> {<br /> "approved": "0000000000000","kkli": "111111111111111"<br /> },<br /> <br /> ]
$artlist = pq('.stepcont');<br /> foreach($artlist as $li){<br /> $stuff[] = array(<br /> 'approved' => pq($li)->find('p')->text(),<br /> 'kkli' => pq($li)->find('a img')->attr('src')<br /> );<br /> }<br /> return $stuff;