Jump to content

[SOLVED] newbie logic question


182x

Recommended Posts

I guess you meant any chance. It depends on how you nest your statements. Consider two examples:

 

<?php
if($somecondition == true){
if($othercondition == true){
	//$somecondition is true and othercondition is true
}else{
	//$somecondition is true and othercondition is false
}
}
?>

 

<?php
if($somecondition == true){
	if($othercondition == true){
	//$somecondition is true and othercondition is true	
}
}else{
//$somecondition is false and othercondition is either true or false
}
?>

 

I dont think i can explain it better in words than by example, so i wont as ill just confuse the issue. Hopefully you understand.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.