PHP tutorial : Basic PHP tags

We can use several types of tags to define the start and end of PHP code. I have illustrated “few” of them that worked for me. The first one is basic echo with No tags, so it will just output the echo.
[php]echo "No Tags"
[/php]

The second one is the most commonly used tag in PHP. It is the widely accepted standard.
[php]
<?php echo "This is the most commonly used tag" ?>
[/php]

The third , is used very frequently , (Haven’t used this in WordPress though)
[php]
<? echo " Another tag "?>
[/php]
And the last, is the old style (familiar with javacript declarations)

[php]
<script language="php">
echo "this is php using script language"
</script>
[/php]

Leave a Reply

Your email address will not be published. Required fields are marked *