PHP Instruction Separation:
PHP follows the same way to terminate the instructions as C, Perl, or most of the popular languages do. PHP use ' ; ' to terminate any instruction but at the same time it is not necessary to put a semi colon at the last line of the code.
As in the example given below, we can see that none of the line has semicolon, whenever we use closing bracket it automatically indicates the end of the instruction.
(Note: The tags used in the example are not usual tags of PHP, these are called asp like tags, to enable these kind of tags change the value of the asp_tags to "on" , in php.ini file)
Example of PHP Instruction Separation:
<%echo "Hello"%>
<
%echo "World"%>Output:
HelloWorld<?php
$var
=12;if
($var==12){?>
<
strong>Equal to tweleve</strong><?php
}
else
{?>
<
strong>Not equal to tweleve</strong><?php
}
?>
Output:
Equal to tweleve
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.