2010-07-16 3 views
0

사용되지 않는 :문제는 일부는이 코드를 다시 작성하는 데 도움 주실 래요

어떤 도움이 높게 평가 될 것이다
if (eregi($asked,$accepted)) { 
$this->plot_type = $which_pt; 
return true; 
} else { 
$this->DrawError('$which_pt not an acceptable plot type'); 
return false; 
} 

, 나는 내가 Google을 통해 가진 모든 수정을 시도했지만 아무도 그것을 고칠 수 없었다.

감사합니다.

답변

0
if (preg_match($asked."i",$accepted)) // there is no case insensitive version of preg_match 
{ 
    $this->plot_type = $which_pt; 
    return true; 
} else { 
    $this->DrawError("$which_pt not an acceptable plot type"); // i think you want " instead of ' here 
    return false; 
} 

해야합니다. 그렇지 않은 경우 정규식의 내용을 $asked에 보내주십시오.