• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 409
  • Last Modified:

Whitespace

I am learning php and it says whitespace are ignored.
ok, I see that, put can some one tell me why the spaces between " Welcome" and "to" are ignored and the other spaces between the other words are not.

<?php echo '<hi Welcome           to john's car lot</h1>'; ?>
0
starview
Asked:
starview
1 Solution
 
arantiusCommented:
In HTML, whitespace is collapsed.  One space, or a million spaces, it's all the same.
That does not mean it is ignored, it means the second and on whitespace character in a row is ignored.  This is also generally but not always true within PHP scripting as well as HTML.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now