How about a "Please" and a "Thank you"? http://php.net/manual/en/control-structures.elseif.php if($var1 == $var2){ // do this } else if($var1 == $var 2){ // do that } else { // do me } PHP: http://php.net/manual/en/control-structures.switch.php switch($var1){ case "value1": //do this break; case "value2": //Do that default: //Do me } PHP: http://php.net/manual/en/control-structures.for.php http://php.net/manual/en/control-structures.while.php http://php.net/manual/en/control-structures.do.while.php http://php.net/manual/en/control-structures.foreach.php /* For Loop */ for($i=0;$i<10;$i++){ // Do it } /* While Loop */ while($i<10){ // Do it } /* Do While Loop */ do{ // Something } while($i<10) /*For Each Loop */ foreach($array as $key=>$value){ // Do something with $key and $value } PHP:
You are absolutely right, I just didn't want to come out too harsh.. But I really wonder if she can make any head or tail out of these codes... But what really annoys me, when people ask questions such as in this thread: http://forums.digitalpoint.com/showthread.php?t=2213788 And the poster claims to be a php coder....
If you want to learn basic php this link will help you. http://php.about.com/od/learnphp/ss/phpbasics.htm