Find Grade of a Student in PHP - PHP Tutorial 42
HTML-код
- Опубликовано: 11 сен 2024
- Notes for You:: Find Grade of a Student in PHP - PHP Tutorial 42
$marks = 30;
if(($marks>=0) && ($marks<=30))
{
echo "Fail" ;
}
elseif(($marks>30) && ($marks<=50))
{
echo "C grade" ;
}
elseif(($marks>50) && ($marks<=70))
{
echo "B grade" ;
}
elseif(($marks>70) && ($marks<=90))
{
echo "A grade" ;
}
elseif(($marks>90) && ($marks<=100))
{
echo "A+ grade" ;
}
else
{
echo "invalid marks" ;
}
OR
$marks = 30;
if(($marks>=0) && ($marks<=30)):
echo "Fail" ;
elseif(($marks>30) && ($marks<=50)):
echo "C grade" ;
elseif(($marks>50) && ($marks<=70)):
echo "B grade" ;
elseif(($marks>70) && ($marks<=90)):
echo "A grade" ;
elseif(($marks>90) && ($marks<=100)):
echo "A+ grade" ;
else:
echo "invalid marks" ;
endif;
Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.
=========================================
Follow the link for next video:
PHP Tutorial 43 - switch case Statement in PHP | PHP switch case Statement
• PHP switch case Statem...
Follow the link for previous video:
PHP Tutorial 41 - elseif ladder Statement in PHP | PHP elseif ladder Statement
• PHP else-if Statement ...
=========================================
PHP Tutorials Playlist:-
• PHP Tutorials
=========================================
Watch My Other Useful Tutorials:-
MySQL Tutorials Playlist:-
• MySQL Tutorials
HTML Tutorials Playlist:-
• HTML Tutorials
CSS Tutorials Playlist:-
• CSS Tutorials
JavaScript Tutorials Playlist:-
• JavaScript Tutorials
=========================================
► Subscribe to our RUclips channel:
/ chidrestechtutorials
► Visit our Website:
www.chidrestec...
=========================================
Hash Tags:-
#ChidresTechTutorials #PHP #PHPTutorial
SUBSCRIBE, SHARE & SUPPORT:
ruclips.net/user/chidrestechtutorials
VISIT & LEARN AT FREE OF COST:
www.chidrestechtutorials.com
Great job thanks you
You are welcome. For more videos please do subscribe, share and explore our RUclips channel.
Very Nice Sir
Thank you. Please do subscribe, share and support.
Thanks
very well explained. thanks. could u plaese put all the episodes in a playlist. It s really difficult to find them on your channel. thanks
All web design and development video tutorials:Properly arranged in playlists.
ruclips.net/channel/UC3Bdolw5nlwMSBa3sex6R4gplaylists?view=50&sort=dd&shelf_id=28&view_as=subscriber
Sir, Can You tell me,How I can insert the grade into php database. Thanks
How to insert grade in php database? Plzz reply sir