Ben kullanarak bir değişkeni karşılaştırmak eğer aşağıdaki PHP == bunu ben kullanmak eğer, != sonra benim kod tatili, birisi açıklamak ya da yardımcı olabilir beklediğiniz gibi mi çalışıyor?
$_GET['p'] = 'home';
// DOES NOT work, it will always return "show JS" regardless to what string I have
if ($_GET['p'] != 'home' || $_GET['p'] != 'create.account'){
echo 'show JS';
}else{
echo 'do not show JS';
}
// Works as I would expect it to
if ($_GET['p'] == 'home' || $_GET['p'] == 'create.account'){
echo 'do not show JS';
}else{
echo 'show JS';
}