The
echo() string function provides a way for us to output or render data to the user, or to output the data to a receiving application(such as Flash). It has no return values and is not actually a function. To output more than one parameter within the language construct, do not encapsulate the parameters in parenthesis"( )". If only one parameter is being sent through the construct it can be encapsulated by parenthesis.
Your data can be enclosed in single quotes or double quotes, just be careful to use the proper variable render methods in each instance of both single and double quotes enclosures. You must also escape quote marks in your strings that match your quote mark enclosure method.
The
print() function works in a similar way but they are technically not exactly the same... if you are curious about the difference between echo() and print() click here:
• print Vs. echo

<?php
echo ("My data goes here"); // Wrapped in parenthesis and in double quotes
echo "<br />"; // Output HTML tags
echo "More data goes here"; // No parenthesis enclosed in double quotes
echo '<br />'; // Enclosed with single quotes works too
echo "My data goes here. ","<em>Hello</em>"; // Multiple parameters
?>
My data goes here
More data goes here
My data goes here. Hello