Tips for better PHP, wish I read yesterday
| From: | Peter J. Schoenster | Date: | Wed, 17 Jul 2002 16:46:52 +0000 |
| Subject: | Tips for better PHP, wish I read yesterday | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108112@lists.php.net to get a copy of this message | ||
Hi,
Awhile back I was asking for just what I'm reading here:
http://www.php9.com/index.php/section/articles/name/PHP%20Guidelines
Some snippets to give you an idea what you will find on that page:
> Another mistake I see around a lot is people writing scripts that will
> not work if register_globals is off. In the next release of PHP
> register_globals will be off by default, so you need to start writing
> your scripts with this in mind.
> <?php
> $name = 'Bill';
> echo "<table align=\"center\"><tr><td>My name is
> $name</td></tr></table>"; ?>
>
> No, don't do that.
> <?=$name?>
>
> This is a short-hand in PHP for:
>
> <?php echo $name; ?>
I have come across some of this in the documentation but not in your face like it is here (and
should be).
Does anyone have any more links to articles like that?
Thanks,
Peter