Below We mentioned some of the sample scripts for your reference.
Below mentioned code is Simple & Basic of PHP code .
<!DOCTYPE html> <html> <body> <?php echo "Test PHP script"; ?> </body> </html> Output: Test PHP script
Below we mentioned sample code for arithmetic operation using PHP. We can do addition, subtraction, multiplication and division in PHP application.
<?php $a = 10; $b = 20; echo $c = $a+$b; echo $c = $a-$b; echo $c = $b*$a; echo $c =$b/$a; ?> Output : 30 -10 200 2