。我想要做的是從數據庫中搜索檢索記錄中的某些Initials。例如我有這樣的記錄..「SGA,MNFA,JGA」我如何編碼一個If語句來搜索SGA是否存在於記錄中。如果發現則繼續,如果沒有,則執行else語句。在if語句中搜索某些字符
樣本:
if($x == "what is the code needed to be placed here to search if SGA is present?")
{
.some code..
}
else
{
.some code..
}
.TIA傢伙!更強大!
strpos,pregmatch [php.net(http://php.net) – Ibu 2011-05-31 22:41:46