/s", $contents, $match); if(isset($match[0])) $contents = str_replace($match[0], "", $contents); $categoryCode = ((isset($match[1]))?$match[1]:""); // カテゴリ名の抽出 preg_match("/\<\!--categoryTitle\[(.+)\]categoryTitle--\>/s", $contents, $match); if(isset($match[0])) $contents = str_replace($match[0], "", $contents); $categoryTitle = ((isset($match[1]))?$match[1]:""); // ページングタグの抽出 preg_match("/\<\!--Paging\[(.+)\]Paging--\>/s", $contents, $match); if(isset($match[0])) $contents = str_replace($match[0], "", $contents); $Paging = ((isset($match[1]))?$match[1]:""); if (!$categoryTitle) { // カテゴリコードが取得できなかった(KWが無い or 不正だった)場合 $categoryTitle = "新着コンテンツ"; } ?>