你好$ mostamazingforumforfastanswersever。最好的書寫方式或是等於聲明
我有一個快速愚蠢的問題;什麼是寫這個的最佳方式:
if ($curpageurl == "www.mysite.com/this" || "www.mysite.com/this/")
{
echo 'this is the this page';
}
,如果不是,那麼我需要調用
while (isset($somevariable)
{
echo '$somevariable';
}
,如果該變量沒有設置,我們無法在此頁面上,然後
else
{
echo 'we are not on this page and the variable isn't set';
}
我知道我是正確的答案不遠處,這實際上可以作爲是,但只有當我去掉||這是我的第一條if語句的一部分。有沒有更好的方法來寫或等於部分? || ==例如?謝謝!
謝謝你更可能的值!我知道我不是嘿嘿:p – skarama