コードに次のエラーがあります。
致命的なエラー: search_results() (以前は A:\wamp\www\includes\func.inc.php:4 で宣言されていました) を A:\wamp\www\includes\func.inc.php 行 39 のコール スタックで再宣言できません
そのファイルには次のものがあります:
<?php
function search_results($keywords){
$returned_results = array();
$where = "";
$keywords = preg_split('/[\s]+/',$keywords);
$total_keywords = count($keywords);
foreach($keywords as $key=>$keyword){
$where .= "`article_content` LIKE '%$keyword%'";
if($key != ($total_keywords - 1)){
$where .= " AND ";
}
}
$results = "SELECT * FROM `articles` WHERE $where";
$results_num = ($results = mysql_query($results)) ? mysql_num_rows($results) : 0 ;
if($results_num === 0){
return false;
}
else{
while($results_row = mysql_fetch_assoc($results)){
$returned_results[] = array(
'article_title' =>$results_row['article_title'],
'article_content' =>$results_row['article_content'],
'article_timestamp' =>$results_row['article_timestamp'],
'article_id' =>$results_row['article_id']
);
}
return $returned_results;
}
}
?>
何が問題なのかわからない。このエラーをできるだけ早く解決するのを手伝ってください! 前もって感謝します