Skip to main content

PHP

PHP Programs for Practice
1. An example of Variables.
            <?php
                        $str=”Hello World”;
                        $X=10;
                        $y=15.75;
                        echo $str,”<br/>”;
                        echo $X, “<br/>”;
                        echo $y;
            ?>
2. An example of assigning values to Variables.           
            <?php
                        $num=22;
                        $square=$num * $num;
                        $script='PHP';
                        echo "<br/>Script $script";
                        echo "<br/>Number $num";
                        echo "<br/>Square $square";
            ?>


Comments

Popular posts from this blog