Comments on Decision Making Using IF-ELSE In PHP
Decision Making Using IF-ELSE In PHP Today we are going to study the tools that will help you to write Decision Making Codes in php. For example, when you sign in to orkut.com you see a message ‘hello username’ on the upper right of every page. Similarly when you login to gmail if you provide wrong username or password you see an error message and if you submit accurate information you are taken to the inbox. If you think deep on these events, this is what we call ‘decision making code’. your write intelligent code that can make decision on user’s input and can act accordingly to the input to produce required output.
4 Comment(s)
Comments
there is a confusion among a few about the following example,
if(condition)
echo “i am first line”;
echo “i am not executed”;
the above code doesn’t mean that the second line will never be executed. One should interpret this example with context to my explanation of IF statement before this example. I have not posted exact code but it’s kinda pseudo code to explain that if you are not making block of code using braces for your IF statement then the first line after IF will be executed as the part of IF statement and the lines following will not be executed as the part of IF though the control will go to them.
therefore to execute more than one line as part of IF statement you should use braces to make block of code.
Hello Guys,
‘If… Else’ statement is used to perform different action for different decision. Conditional (relational operator) statements are used to perform different action on basis of different decision. So we can say that ‘If…Else’ statement generally used with conditional statement........................
for more details please check out this link....
Thanks !!!!!
Was helpful with vivid explanation. Otherwise, excellent procedure. Keep it up
I delight in, result in I found exactly what I used to be taking a look for. You’ve ended my 4 day long hunt! God Bless you man. Have a nice day. Bye!