From: clancy_1 on
On Thu, 28 Jan 2010 21:10:42 +0100, rene7705(a)gmail.com (Rene Veerman) wrote:

>On Thu, Jan 28, 2010 at 12:31 AM, <clancy_1(a)cybec.com.au> wrote:
>> On Wed, 27 Jan 2010 10:21:00 -0800, dealtek(a)gmail.com (dealtek) wrote:
>>Opening tables, etc, wrongly generally messes the page up completely, but
>> forgetting to close them again often has no affect no visible effect at all -- until you
>> make some innocent change and everything goes haywire!
>
>whenever i write an opening tag, i immediately write the closing tag
>next, then cursor back to fill it in.

Not so easy when you are using PHP to generate a complex layout!

From: Paul M Foster on
On Fri, Jan 29, 2010 at 08:17:34AM +1100, clancy_1(a)cybec.com.au wrote:

> On Thu, 28 Jan 2010 21:10:42 +0100, rene7705(a)gmail.com (Rene Veerman) wrote:
>
> >On Thu, Jan 28, 2010 at 12:31 AM, <clancy_1(a)cybec.com.au> wrote:
> >> On Wed, 27 Jan 2010 10:21:00 -0800, dealtek(a)gmail.com (dealtek) wrote:
> >>Opening tables, etc, wrongly generally messes the page up completely, but
> >> forgetting to close them again often has no affect no visible effect
> at all -- until you
> >> make some innocent change and everything goes haywire!
> >
> >whenever i write an opening tag, i immediately write the closing tag
> >next, then cursor back to fill it in.
>
> Not so easy when you are using PHP to generate a complex layout!

Use heredocs to do it. Then you can generate the layout in PHP and still
do what dealtek(a)gmail.com said.

Paul

--
Paul M. Foster
From: Ashley Sheridan on
On Thu, 2010-01-28 at 16:23 -0500, Paul M Foster wrote:

> On Fri, Jan 29, 2010 at 08:17:34AM +1100, clancy_1(a)cybec.com.au wrote:
>
> > On Thu, 28 Jan 2010 21:10:42 +0100, rene7705(a)gmail.com (Rene Veerman) wrote:
> >
> > >On Thu, Jan 28, 2010 at 12:31 AM, <clancy_1(a)cybec.com.au> wrote:
> > >> On Wed, 27 Jan 2010 10:21:00 -0800, dealtek(a)gmail.com (dealtek) wrote:
> > >>Opening tables, etc, wrongly generally messes the page up completely, but
> > >> forgetting to close them again often has no affect no visible effect
> > at all -- until you
> > >> make some innocent change and everything goes haywire!
> > >
> > >whenever i write an opening tag, i immediately write the closing tag
> > >next, then cursor back to fill it in.
> >
> > Not so easy when you are using PHP to generate a complex layout!
>
> Use heredocs to do it. Then you can generate the layout in PHP and still
> do what dealtek(a)gmail.com said.
>
> Paul
>
> --
> Paul M. Foster
>


Not really always. I often use fairly complex code to handle output of
content into tables where the number of columns varies on the content.
Cases like this are not something you can tackle with heredoc or nowdoc,
and don't allow you to just create the opening and closing tags and
build the PHP around them. Sometimes you just have to use your smarts a
bit :p

Of course, I do find that proper code indentation is of the absolute
importance, and running the output through a validator helps!

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: "Michael A. Peters" on
clancy_1(a)cybec.com.au wrote:
> On Thu, 28 Jan 2010 21:10:42 +0100, rene7705(a)gmail.com (Rene Veerman) wrote:
>
>> On Thu, Jan 28, 2010 at 12:31 AM, <clancy_1(a)cybec.com.au> wrote:
>>> On Wed, 27 Jan 2010 10:21:00 -0800, dealtek(a)gmail.com (dealtek) wrote:
>>> Opening tables, etc, wrongly generally messes the page up completely, but
>>> forgetting to close them again often has no affect no visible effect at all -- until you
>>> make some innocent change and everything goes haywire!
>> whenever i write an opening tag, i immediately write the closing tag
>> next, then cursor back to fill it in.
>
> Not so easy when you are using PHP to generate a complex layout!
>
>

Use DOMDocument.
Then you don't have to worry about closing the tags ;)
From: Rene Veerman on
On Thu, Jan 28, 2010 at 10:17 PM, <clancy_1(a)cybec.com.au> wrote:
> On Thu, 28 Jan 2010 21:10:42 +0100, rene7705(a)gmail.com (Rene Veerman) wrote:
>
>>On Thu, Jan 28, 2010 at 12:31 AM,  <clancy_1(a)cybec.com.au> wrote:
>>> On Wed, 27 Jan 2010 10:21:00 -0800, dealtek(a)gmail.com (dealtek) wrote:
>>>Opening tables, etc, wrongly generally messes the page up completely, but
>>> forgetting to close them again often has no affect no visible effect at all -- until you
>>> make some innocent change and everything goes haywire!
>>
>>whenever i write an opening tag, i immediately write the closing tag
>>next, then cursor back to fill it in.
>
> Not so easy when you are using PHP to generate a complex layout!
>
>

eh, why not?

"complex" layouts can and should be split up into functions, which can
adhere to the same principle..