I've just started learning php and have a question. Is it necessary to tab over?
Example:
<?php function go(){
echo("whatever"); } ?>
is it necessary to have the space from the edge where the echo is?yes if you follow standards. but you don't have to.
it just makes it easier to read. if you want to follow standards than click the link in my sig (for php)ok, thanksWhat i normally do, is code pretty dodgy, then i fix it up so that i can read/add to it laterHmm.. I always try to follow the PEAR standards from the beginning. It's way too tedious to go back and fix the code up later. Just like it's too boring to add comments afterwards. If you have a lot of self-discipline, do what you like, but I recommend you to write good, legible and commented code from the start. Unless you're writing code for someone on the forum of course
Example:
<?php function go(){
echo("whatever"); } ?>
is it necessary to have the space from the edge where the echo is?yes if you follow standards. but you don't have to.
it just makes it easier to read. if you want to follow standards than click the link in my sig (for php)ok, thanksWhat i normally do, is code pretty dodgy, then i fix it up so that i can read/add to it laterHmm.. I always try to follow the PEAR standards from the beginning. It's way too tedious to go back and fix the code up later. Just like it's too boring to add comments afterwards. If you have a lot of self-discipline, do what you like, but I recommend you to write good, legible and commented code from the start. Unless you're writing code for someone on the forum of course