React Installation and Requirements: Complete Beginner's Guide

Image
React.js Tutorial: Installation, Requirements and First Project 1. Introduction React.js is one of the popular JavaScript libraries used to create modern and interactive websites. Today, many websites need more than simple HTML pages. Users expect fast page updates, interactive buttons, dynamic forms, smooth navigation and attractive user interfaces. React helps developers create these features in an organized way. If you are a beginner learning web development, React is a useful technology to add to your skills. Before writing your first React application, you should understand its basic requirements, installation process and working principles. In this tutorial, we will learn what React.js is, how it started, its important features, advantages and disadvantages, and how React works. We will also explore practical code examples that you can try on your computer. This guide is designed for students, beginners and anyone who wants to start learning frontend development. By...

PHP using leap year program

 PHP Using leap year program 

PHP using leap year program


                       Leap Year 

1]  leap year is the one  has 366 days in a year.

2] leap year comes after every four years.

3]  leap year is always a multiple of four.

4] For example,1999,2000, 2007,2008,2009,2010, 2020, 2024, etc are leap years.


Q. Leap Year Program php

 Example

<?php
function isLeap($year)
{
    return(date('L',mktime(0,0,1,1, $year))==1);
}
    for($year=1991; $year<2016;$year++)
    {
        if(isLeap($year))
        {
            echo "$year : LEAP YEAR <br>\n";
        }
        else
        {
            echo "$year:Not leap year<br>\n";

        }
    }
?>

Q. leap year program php

    Output :

leap year program php


 Q. leap year program using  form php

    Example


<html>
    <form method="post">
        Enter the Year : <input type ="text"
name="year">
        <input type="submit" name="submit"
value="submit">
</form>
<?php
if($_POST)
{
    $year = $_POST['year'];
    if(!is_numeric($year))
    {
        echo "string not allowed,
Input should be a number";
        return;
    }
    if((0==$year %4 )and(0!=$year % 100)or
(0==$year%400))
    {
        echo "$year this number is a Leap Year";
    }
    else{
        echo "$year  this numberis not
a Leap Year";

    }
}
?>


Q. leap year program using  form php

    Output :



leap year program php

PHP using leap year program


READ MORE :-

php for loop

Alphabet triangle pattern

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples