note 116912 added to control-structures.elseif

From: Date: Fri, 20 Mar 2015 11:07:48 +0000
Subject: note 116912 added to control-structures.elseif
Groups: php.notes 
Request: Send a blank email to php-notes+get-201992@lists.php.net to get a copy of this message
/*If and elseif is the most used control among php. I personally love it and use them every now on then. If and elseif gives you the power to create the main algorithm. For simple example it's Weekend or not.*/ $currentday="Monday"; if($currentday=="Sunday"){echo "Sunday is Fun day.";} elseif($currentday=="Saturday"){echo "Great! No work for Two days.";} else{echo "Work hard so that you could see the Weekend.";} /*Now in here if change the value of $currentday to Monday, Tuesday, Wednesday, Thursday, Friday then You will get the output "Work hard so that you could see the Weekend". However if you change $currentday as Saturday you will get output "Great! No work for Two days." And for Sunday in $currentday you get "Sunday is Fun day."*/ ---- Server IP: 72.52.91.14 Probable Submitter: 117.226.160.146 ---- Manual Page -- http://php.net/manual/en/control-structures.elseif.php Edit -- https://master.php.net/note/edit/116912 Del: integrated -- https://master.php.net/note/delete/116912/integrated Del: useless -- https://master.php.net/note/delete/116912/useless Del: bad code -- https://master.php.net/note/delete/116912/bad+code Del: spam -- https://master.php.net/note/delete/116912/spam Del: non-english -- https://master.php.net/note/delete/116912/non-english Del: in docs -- https://master.php.net/note/delete/116912/in+docs Del: other reasons-- https://master.php.net/note/delete/116912 Reject -- https://master.php.net/note/reject/116912 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201992) next »