XMLデータ内のタグ件数と属性値をループ取得-PHP simplexml_load_file
PHPのsimplexml_load_fileでXMLをパースし、タグ内の属性値、
例えば
<item title="かっぱ">
のような場合にtitle属性の”かっぱ”にあたる部分を、7つ取得する。
7件以下の場合は、7件以下の件数分のtitle属性値を取得して表示する場
合の記述
$rssdata = simplexml_load_file('http://***.com');
$arrayCnt = array();
$tcount;
foreach($rssdata -> channel ->item as $acount){
続きは システム開発スクール