MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

PHP Programing language

Echo in PHP
Previous Home Next

Echo Statement in PHP

The echo statement can be used with or without parentheses: echo or echo(). It is  used to output data to the screen. It has no return value. Actually echo() is not a function, it is a language construct therefore you can use it without parentheses.

Example:

<html>
<body>
<?php
$txt1 = "Apple, Mango, Banana, Grapes, Orange";
$x = 3;
$y = 2;

echo "Fruits are: " . $txt1 . ".<br>";
echo "Total fruits are: ";
echo $x + $y;
?>
</body>
</html>

Output:

Fruits are: Apple, Mango, Banana, Grapes, Orange.
Total fruits are: 5

Print Statement in PHP

The print statement can be used with or without parentheses: print or print(). It is used to display a string. It has a return value of 1 so it can be used in expressions. Print() is not actually a real function, it is a language construct like echo.

Example:

<html>
<body>
<?php
$txt1 = "Apple, Mango, Banana, Grapes, Orange";
$x = 3;
$y = 2;

print "Fruits are: " . $txt1 . ".<br>";
print "Total fruits are: ";
print $x + $y;
?>
</body>
</html>

output:

Fruits are: Apple, Mango, Banana, Grapes, Orange.
Total fruits are: 5
Previous Home Next