我有下面的代碼片段爲什麼我的PHP字符串比較失敗?
if ($summary == "CFD funding Interest Paid" ||
$summary == "Commissions" ||
$summary == "Closing trades") {
print $summary.",".$date.",".$reference.",".$description.",".$amount."<br>";
}
else {
print $summary."*<br>";
}
它輸出以下
Commissions* Commissions* Closing trades* Commissions* Closing trades*
怎麼會琴絃似乎並沒有被匹配?
$彙總是什麼樣的? – powtac 2011-05-17 08:40:43
已檢查隱藏字符(新行和東西)和區分大小寫? – Yoshi 2011-05-17 08:41:12
我試過你的代碼設置$摘要=「佣金」,它工作正常。你可以在之前發佈缺少的代碼嗎? – 2011-05-17 08:43:38