Syntax
Recall: From our last post we discussed about syntax, but let's take an insight.
Below are the opening and closing syntax of a php.
Opening tags:
<?php
<?
<script language='php'>
Closing tags:
?>
?> (short tag)
</script>
PHP echo
The echo statement helps in inserting words into a web page. The echo statement is used more often in PHP. A statement can be echoed using the following types:
Recall: From our last post we discussed about syntax, but let's take an insight.
Below are the opening and closing syntax of a php.
Opening tags:
<?php
<?
<script language='php'>
Closing tags:
?>
?> (short tag)
</script>
PHP echo
The echo statement helps in inserting words into a web page. The echo statement is used more often in PHP. A statement can be echoed using the following types:
- Single Quote
- Double Quotes
- Without Quote
- "here document" method
Let's take a "hello simply lecture" example:
<?php
echo 'hello simply lecture'; //single quote
echo "hello simply lecture"; //double quote
echo hello simply lecture; //without quote
echo <<<END
hello simply lecture
END;
?>
Comments
Post a Comment