mammothguy wrote:I had put it in your (dalecosp) way, but I left out a bracket somewhere.
Thanks a lot.
Style makes a big difference sometimes. Mine is above, note that each closing bracket should line up in a straight line below the conditional (or whatever) that caused the need for it.
Another, possibly more prevalent style, sometimes known as "K&R" (for Brian Kernighan and Dennis Ritchie, authors of the most well-known C textbook [among other things]):
<?php
if ($foo)
{
if (isset($foo))
{
do_some_foo();
}
}
?>
So, every top and bottom bracket are aligned. Helps to check for balance. Of course, some IDE's/editors can do this for ya, too....