O'Reilly logo

PHP for Teens by Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to Style

There are millions of different style methods, but the most important part is that you stay consistent. You must follow a pattern. If you stray, put your pattern into words and print it—laminate it if you must. Again, the most important part is staying consistent.

What does this mean? You can choose to make all of your variables start with var, so that, for instance, a variable that contains a name is called $varname. Heck, you could even make it called $afbkajfbkaname, as long as you stay so consistent that your address variable is called $afbkajfbkaaddress. One popular way of keeping track of your variables is to preface each name with the type of variable it is. For example, a string called $strFirstName and an integer called ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required