A simple PHP function that returns the zodiac sign according to day and month.
-
Click to select it.
<?php
function zodiac($day, $month) {
// returns the zodiac sign according to $day and $month ( https://coursesweb.net/ )
$zodiac = array('', 'Capricorn', 'Aquarius', 'Pisces', 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn');
$last_day = array('', 19, 18, 20, 20, 21, 21, 22, 22, 21, 22, 21, 20, 19);
return ($day > $last_day[$month]) ? $zodiac[$month + 1] : $zodiac[$month];
}
// 15 - October
echo zodiac(15, 10); // Libra
Daily Test with Code Example
HTML
CSS
JavaScript
PHP-MySQL
Which tag defines the clickable areas inside the image map?
<map> <img> <area><img src="image.jpg" usemap="#map1">
<map name="map1">
<area shape="rect" coords="9, 120, 56, 149" href="#">
<area shape="rect" coords="100, 200, 156, 249" href="#">
</map>
Which CSS property defines what is done if the content in a box is too big for its defined space?
display overflow position#id {
overflow: auto;
}
Click on the event which is triggered when the mouse is positioned over an object.
onclick onmouseover onmouseoutdocument.getElementById("id").onmouseover = function(){
document.write("Have Good Life");
}
Indicate the PHP variable that contains data added in URL address after the "?" character.
$_SESSION $_GET $_POSTif(isset($_GET["id"])) {
echo $_GET["id"];
}