PHP Whitespace

Whitespace is not significant to the PHP interpreter. You can make indentations and have multiple blank rows anywhere in your code without creating problems.

The extra whitespace in the following examples is all ignored by the interpreter:

<?php echo 'Teacher: We will have only half a day of school this morning.'; ?>

<?php
echo 'Class: Hooray!';
?>

<?php

echo 'Teacher: We will have the other half this afternoon!';

?>

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.