Thursday, February 2, 2012

PHP Tutorial : echo



              II - C - echo :
Well now that we have defined the variables at the same time we have allocated their value, thanks to post the echo, in an HTML :


Comments on this echo statement:

 Here I have only two instructions 'show': An automatic and conditional.
You will notice that I went to the line in the display with the tag br /.
Notice that all the quotes that are just text were neutralized by putting \ in front of each one so they are not considered the end of the string.

 Notice that the display of the contents of the variable is done automatically, with the bare variable in the code.
Notice that the point is used to concatenate (or paste text butt).
You have to manage the display spaces within the quotes. Here syntax is vital.


 Finally you will notice that my condition (if it's a boy or a girl), although written to the line in my code and opening a second echo statement, appears nonetheless a continuation of my previous echo ...

 In other words, it is always at the HTML code that will run the line breaks of the display (tags br /, p tags, etc.).

The line breaks you do spontaneously in your PHP code after each statement are only line breaks intended for the programmer to improve readability of the code.

 Final note: Take good habit to know what level you are: at the meta-language PHP
 or at the HTML that results in a display.


See You

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More