Access Array Items
Program Info
Program Code
×

Access Array Items

We accessing array items and print them

Footer

×

Access Array Items

<!DOCTYPE html>
<html>
<body>

<?php  
$cars = array("Volvo", "BMW", "Toyota");
echo $cars[2];
?>  

</body>
</html>

Footer

Access Associative Arrays
Program Info
Program Code
×

Access Associative Arrays

We accessing the item of associative array.

Footer

×

Access Associative Arrays

<!DOCTYPE html>
<html>
<body>

<?php
$car = array("brand"=>"Ford", "model"=>"Mustang", "year"=>1964);
echo $car["model"];
?>

</body>
</html>

Footer

Access Indexed Arrays
Program Info
Program Code
×

Access Indexed Arrays

We accessing the item of indexed array.

Footer

×

Access Indexed Arrays

<!DOCTYPE html>
<html>
<body>

<?php
$cars = array("Volvo", "BMW", "Toyota"); 
echo $cars[0];
?>

</body>
</html>

Footer

Add Comment at the end of a Line
Program Info
Program Code
×

Add Comment at the end of a Line

We adding a single line comment at the end of a line.

Footer

×

Add Comment at the end of a Line

<!DOCTYPE html>
<html>
<body>

<?php
echo "Welcome Home!"; // Outputs a welcome message
?>
 
</body>
</html>

Footer

Create a Random Integer
Program Info
Program Code
×

Create a Random Integer

We creating a random integer between 10 and 100.

Footer

×

Create a Random Integer

<!DOCTYPE html>
<html>
<body>

<?php
echo(rand(10, 100));
?>

</body>
</html>

Footer

Get Absolute Value Through abs Math Function
Program Info
Program Code
×

Get Absolute Value Through abs Math Function

We are getting absolute (positive) value with the help of abs math function.

Footer

×

Get Absolute Value Through abs Math Function

<html>
    <head>

    </head>
    <body>
        <?php
          $a=abs(-10);
           echo "$a <br>";
          
        ?>
    </body>
</html>

Footer


×

Name : Krishna Verma    |    Father's Name : Mr. Satish Kumar    |    Email ID : krishnaverma28081997@gmail.com    |    Religion : Hindu    |    Address : Dayampur, kanker khera, Meerut Cantt (250001), UP    |    Date of Birth : 28 August 1997    |    Marital Status : Non-Married    |    Place of Birth : Dayampur Kanker Khera Meerut Cantt.    |    Gender : Male    |    Age : 28    |    Contact : 9520335394    |    Father's Occupation : Sports man    |    Mother's Name : Smt. Kuntesh Devi    |    Mother's Occupation : Homemaker    |    Number of Brothers : 1    |    Number of Sisters : 1    |    Current Residence : Dayampur kanker khera meerut cantt    |    Family Type : Nuclear Family    |    Family Name : verma    |    Height : 5' 6''    |    Weight : 70 kg    |    Complexion : Fair    |    Body Type : Athletic    |    Hair Color : Black    |    Health Status : Good    |    Any Physical Disability : No    |    Highest Qualification : B.Tech (CSE)    |    Master Skill : PHP Laravel    |    Total Projects : 40 +    |    Total Skills : 25 +    |    Languages Known : Hindi and English    |    Website : krishnaportfolio.in    |    Siblings : 3    |    Nationality : Indian    |    Total Experience : 5 Years    |    LinkedIn : https://www.linkedin.com/in/krishna-verma-840b71356/    |    Total Programs : 10000    |    Total Projects : 40    |    Total Skills : 25    |    Total Experience : 5    |    Total DSA Problems : 165    |    Total Served Companies : 2