62Part IPHP: The (Multiple domain web hosting) BasicsPHP syntax is relevant only

62Part IPHP: The BasicsPHP syntax is relevant only within PHP, so we assume for the rest of this chapter that PHPmode is in force that is, most code fragments will be assumed to be embedded in an HTMLpage and surrounded with the appropriate tags. PHP s Syntax Is C-LikeThe third most important thing to know about PHP syntax is that, broadly speaking, it is likethe C programming language. If you happen to be one of the lucky people who already knowC, this is very helpful; if you are uncertain about how a statement should be written, try itfirst the way you would do it in C, and if that doesn t work, look it up in the manual. The restof this section is for the other people, the ones who don t already know C. (C programmersmight want to skim the headers of this section and also see Appendix A, which is specificallyfor C programmers.) PHP is whitespace insensitiveWhitespaceis the stuff you type that is typically invisible on the screen, including spaces, tabs, and carriage returns (end-of-line characters). PHP s whitespace insensitivity does notmean that spaces and such never matter. (In fact, they are crucial for separating the wordsinthe PHP language.) Instead, it means that it almost never matters how manywhitespace char- acters you have in a row one whitespace character is the same as many such characters. For example, each of the following PHP statements that assigns the sum of 2+2to the vari- able $fouris equivalent: $four = 2 + 2; // single spaces$four =2+2 ; // spaces and tabs$four = 2+ 2; // multiple linesThe fact that end-of-line characters count as whitespace is handy, because it means younever have to strain to make sure that a statement fits on a single line. PHP is sometimes case sensitiveHaving read that PHP isn t picky, you may be surprised to learn that it is sometimes case sensitive (that is, it cares about the distinction between lowercase and capital letters). In particular, all variables are case sensitive. If you embed the following code in an HTML page: ); print( Variable CaPiTaL is $CaPiTaL
); ?> The output you will see is: Variable capital is 67Variable CaPiTaL is07
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp web hosting services

Leave a Reply