Become PHP Expert in 30 days
FreeMarriage.com - Free Online Matrimonial
FlashWebHost.com - Professional Web Hosting, Designing.
http://php.flashwebhost.com/austin/day4.php
Stefin ... run!!!!Code:<?php$animal = 'tiger'; $color = 'green'; if($animal == 'frog'){ if($color=='green'){ echo 'You are green frog'; } else echo 'You are an invisible frog'; } else if($animal=='dragon'){ if($color == 'green') echo 'You are a green dragon and stefin got your eggs :D'; else if($color=='red') echo ' You are a red dragon and stefin is coming to steal ur eggs too :D'; } else{ echo 'i know you are a tiger and you are green.'; }
Become PHP Expert in 30 days
FreeMarriage.com - Free Online Matrimonial
FlashWebHost.com - Professional Web Hosting, Designing.
http://php.flashwebhost.com/vineesh/...n_making_1.php
------------------------Code:<?php $ticket = 'no'; if ($ticket == 'yes') { echo 'We will get ticket' ; } if ($ticket == 'no') { echo 'We will not get ticket' ; }
http://php.flashwebhost.com/vineesh/...n_making_2.php
Code:<?php $mark = 99; if ($mark == 99) { echo 'You have got 99 marks, you win!'; } if ($mark == 19) { echo 'Sorry, You are failed'; }
http://php.flashwebhost.com/vineesh/...n_making_3.php
and my code is as follows:
Code:<?php $passMark = 35; $student1Name = 'Manu'; $student1Mark = 34; $student2Name = 'Saritha'; $student2Mark = 60; $student3Name = 'Sudhi'; $student3Mark = 93; $class1 = 'First Class'; $class2 = 'Distinction'; echo 'Passmark = ' . $passMark . '<br> <br>' ; echo 'Student names with marks <br> <br>'; echo $student1Name . ' = ' . $student1Mark . ' marks. <br>' ; echo $student2Name . ' = ' . $student2Mark . ' marks. <br>' ; echo $student3Name . ' = ' . $student3Mark . ' marks. <br> <br>' ; if ($student1Mark < $passMark) { echo $student1Name . ', you have got only ' . $student1Mark . ' marks and you are failed. <br>' ; } if ($student2Mark > $passMark) { echo $student2Name . ', you have got ' . $student2Mark. ' marks and you passed with ' . $class1 . '<br>' ; } if ($student3Mark > $passMark) { echo 'Congratulations ! ' . $student3Name . '!. You have got ' . $student3Mark . ' marks and you passed with ' . $class2 ; }
DAY 4 PHP PROGRAMMING
http://php.flashwebhost.com/tom/trai..._Ernakulam.php
Code:<?php $trainGoesToErnakulam = 'no'; if ($trainGoesToErnakulam == 'yes') { echo 'I Will Enter The Train.'; } if ($trainGoesToErnakulam == 'no') { echo 'I Will Not Enter The Train.'; }
DAY 4 PHP PROGRAMMING
http://php.flashwebhost.com/tom/if_greater.php
Code:<?php $passMark = '35'; $studentName = 'Tom'; $studentMark = '60'; if ($studentMark>$passMark) { echo 'Congratulations '. $studentName . ' ! You passed exam with ' . $studentMark . ' marks.'; }
http://php.flashwebhost.com/vineesh/...n_making_5.php
Code:<?php $rain = 'eeeee'; if ($rain == 'yes') { echo 'It will rain today.'; } else if ($rain == 'no') { echo 'It will not rain today.'; } else { echo 'huh...what is this ?'; }
DAY 4 PHP PROGRAMMING
http://php.flashwebhost.com/tom/if_else_greater.php
Code:<?php $passMark = '35'; $studentName = 'Tom'; $studentMark = '30'; if ($studentMark > $passMark) { echo 'Congratulations '. $studentName . ' ! You passed exam with ' . $studentMark . ' marks.'; } else { echo ' Sorry! You failed. Good luck next time.' ; }
DAY 4 PHP PROGRAMMING
http://php.flashwebhost.com/tom/if_else_greater_bug.php
Code:<?php $passMark = '35'; $studentName = 'Tom'; $studentMark = '35'; if ($studentMark >= $passMark) { echo 'Congratulations ' . $studentName . ' ! You passed exam with ' . $studentMark . ' marks' ; } else { echo 'Sorry! You failed. Good luck next time.' ; }
Last edited by vineesh; 05-14-2014 at 11:31 AM.
Bookmarks