DAY 2 PHP PROGRAMMING
http://php.flashwebhost.com/tom/day_2_variables_4.php
Code:<?php $numOfBoys = '20' ; $numOfGirls = '25' ; echo 'Total number of students = ' . ($numOfBoys+$numOfGirls) ;
DAY 2 PHP PROGRAMMING
http://php.flashwebhost.com/tom/day_2_variables_4.php
Code:<?php $numOfBoys = '20' ; $numOfGirls = '25' ; echo 'Total number of students = ' . ($numOfBoys+$numOfGirls) ;
Last edited by image; 05-09-2014 at 10:48 AM.
This program have syntax error on line
$ missing for numgirls.Code:echo 'Total number of students = ' . ($numboys+numgirls) ;
Proper usage.
Only strings values need to be enclosed within quotes (' or ").Code:<?php $numBoys = 20; $numGirls = 25; echo 'Total number of students = ' . ($numBoys + $numGirls) ;
Variable names, if two words, Capitalize first letter of 2nd, 3rd, etc.. word.
Become PHP Expert in 30 days
FreeMarriage.com - Free Online Matrimonial
FlashWebHost.com - Professional Web Hosting, Designing.
Bookmarks