React Component Nesting and Reusability Explained – A Beginner's Guide 2026

Image
1. Introduction to React Component Nesting and Reusability React JS is a popular JavaScript library used to create interactive and user-friendly web applications. One of the most useful concepts in React development is component-based architecture. Instead of writing an entire website inside one large file, developers divide the user interface into smaller and manageable parts called components. Two important concepts in this approach are component nesting and component reusability. Component nesting means placing one React component inside another component to build a complete user interface. For example, a website page may contain a header, navigation bar, sidebar, content section, and footer. Each section can be developed as a separate component and combined inside a main component. Component reusability means creating a component once and using it multiple times in different parts of an application. For example, the same button, product card, or navigation menu can be reused withou...

PHP Data and Time Function

            

   PHP Data and  Time

The  dete() function accept a format string as parameter 
formate the local date and time specified format 

Syntax :- 

mktime(hour, minute, second, month, day, year)
 
date(format,timestamp)


 data () funtion 

 d = Represents the day of month (1 to 31)
m = Represen
ts a month (1 to 12)
y = Represents a year (4 digits)
l = Represents the day of the  week


Time () Function :-

   Returns the Current time in the  number of the  seconds 
  time() function  used return the courrent time 


H - 24 - hour (00 to 23)
i - Minutes with (00 to 59)
s - Second with leading (00 to 59 )
a - Lowercase ante meridiem and post meridiem (am to pm)


   ஃ Default timezone 

      date _default_timezone_set('UTC');

        ፨ Default Timezone UTC 

   ஃ Current date and time

        $currentDateTime = date('Y-m-d H:i:s') ;       

              ፨ YYYY-MM-DD-HH-MM:SS     

   ஃ Current date format

       $currentDate = date('F j,Y');

             ፨ Month day , Year

   ஃ Current time 

      $currentTime12Hr = date('h:i:s A');

               ፨ hh: mm:ss AM/PM

  
 

  Example :-

<?php
echo "Today is " . date("y/m/d") .  "<br>";
echo "Today is" . date("y.m.d")  .  "<br>";
echo "Today is" . date(y-m-d")  ."<br>";
echo "Today is ". date("l");

?>

 Output :-




 

2] Date :- 

Example 


<?php
$day =date("d/m/y");
echo $day;


 Output :-

 

3]  Day :- 

  Example :-


<?php

echo "Today is ". date("l");

?>

Output :-




  

  4]  Date  :-

Example :-'

<?php

$d= mktime(11,14,54,8,12 ,2014);
echo " date " . date("y-m-d h:i:sa");

?>

Output :-




5]  Date()  Function :-

Example :-


<?php
$date =date ("D . M .D .Y");
print("Date :- <br>". $date);
?>


OutPut :-


6] Date()  Function :-

Example:-


<?php
$date = date("D M d y");

print ("Date :-". $date);
?>

Output :-


7] 

Example:-

<?php
   date_default_timezone_set('UTC');
   
   echo date("l");
   echo "
";
   
   echo date('l dS \of F Y h:i:s A');
   echo "
";
?>

Output :-




Related Post :-

Registration form in php

html color tag

Comments

Popular posts from this blog

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples

Learn CSS text-decoration-color Property in Simple Words with Examples