Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-29 Thread Larry Garfield
On Saturday 28 October 2006 18:15, Robert Cummings wrote: As far as I can tell, single and double quotes are interchangeable (but unmixable) in both HTML and XHTML. When did single quotes go bad? Hmmm, I've been under the impression for quite some time that single quotes are somehow

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Nisse Engström
On Thu, 26 Oct 2006 13:10:17 -0400, Robert Cummings wrote: On Thu, 2006-10-26 at 11:43 +0200, clive wrote: or you could write it likes this ' echo option value='$day' $selected $day /option; much easier to read, but slightly more taxing on the server. Also slightly more taxing on

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Nisse Engström
On Thu, 26 Oct 2006 01:04:25 -0700, Paul Novitski wrote: It's so interesting that some details bug some people and others bug others. In an expression such as this: echo 'option value=' . $day . '' . $selected . '' . $day . '/option'; ...I count eight transitions (instances

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Paul Novitski
On Thu, 26 Oct 2006 01:04:25 -0700, Paul Novitski wrote: It's so interesting that some details bug some people and others bug others. In an expression such as this: echo 'option value=' . $day . '' . $selected . '' . $day . '/option'; ...I count eight transitions (instances of

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-28 Thread Robert Cummings
On Sat, 2006-10-28 at 13:27 +0200, Nisse Engström wrote: On Thu, 26 Oct 2006 13:10:17 -0400, Robert Cummings wrote: On Thu, 2006-10-26 at 11:43 +0200, clive wrote: or you could write it likes this ' echo option value='$day' $selected $day /option; much easier to read, but

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-27 Thread tedd
At 10:23 AM -0700 10/26/06, Paul Novitski wrote: At 10/26/2006 08:24 AM, tedd wrote: I think a div would work just as well -- span seems so old-world to me. :-) By default, div is a block element and span is inline, so span seemed like the natural fit for a sentence fragment. I don't think

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-27 Thread tedd
At 1:09 PM -0400 10/26/06, Robert Cummings wrote: On Thu, 2006-10-26 at 11:24 -0400, tedd wrote: At 1:04 AM -0700 10/26/06, Paul Novitski wrote: At 10/25/2006 11:24 PM, Robert Cummings wrote: I use a tag based template system, there's no PHP in my content so my content files for the most

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-27 Thread Paul Novitski
At 10:23 AM -0700 10/26/06, Paul Novitski wrote: For a robust general CMS, though, I want a completely unambiguous demarcation of replacable content. At 10/27/2006 09:01 AM, tedd wrote: If you want a completely unambiguous demarcation then use xml with a defined schema. I don't think you

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Robert Cummings
On Wed, 2006-10-25 at 22:53 -0700, Paul Novitski wrote: At 10/25/2006 04:09 PM, Stut wrote: print 'option value='.$day.''; if ($selected_day_of_month == $day) print ' selected'; print ''.$day.'/option'; On Wed, 2006-10-25 at 17:35 -0700,

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Paul Novitski
At 10/25/2006 11:24 PM, Robert Cummings wrote: Now, the thing that I dislike about heredoc for such small strings is the switching between heredoc mode and the switching back. It's ugly on the scale of switching in and out of PHP tags. It's so interesting that some details bug some people and

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread clive
Paul Novitski wrote: It's so interesting that some details bug some people and others bug others. In an expression such as this: echo 'option value=' . $day . '' . $selected . '' . $day . '/option'; or you could write it likes this ' echo option value='$day' $selected $day

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Arpad Ray
Incidentally, a nice side effect of heredoc is that some editors (like vim) recognise EOHTML, EOSQL etc and highlight the contents accordingly. Arpad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread tedd
At 1:04 AM -0700 10/26/06, Paul Novitski wrote: At 10/25/2006 11:24 PM, Robert Cummings wrote: I use a tag based template system, there's no PHP in my content so my content files for the most part just look like more HTML. This is a different topic, but also one close to my heart. Yes, I

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Stut
tedd wrote: I think a div would work just as well -- span seems so old-world to me. :-) The span element is in no way old-world. Spans and divs are two different things with different goals. A div is a block-level element, whereas spans are inline. Spans are intended for stylistic changes

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Robert Cummings
On Thu, 2006-10-26 at 01:04 -0700, Paul Novitski wrote: At 10/25/2006 11:24 PM, Robert Cummings wrote: Now, the thing that I dislike about heredoc for such small strings is the switching between heredoc mode and the switching back. It's ugly on the scale of switching in and out of PHP tags.

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Robert Cummings
On Thu, 2006-10-26 at 10:50 +0100, Arpad Ray wrote: Incidentally, a nice side effect of heredoc is that some editors (like vim) recognise EOHTML, EOSQL etc and highlight the contents accordingly. That's really cool. Never even thought to do that. I wonder if anyone has done the footwork for

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Robert Cummings
On Thu, 2006-10-26 at 11:24 -0400, tedd wrote: At 1:04 AM -0700 10/26/06, Paul Novitski wrote: At 10/25/2006 11:24 PM, Robert Cummings wrote: I use a tag based template system, there's no PHP in my content so my content files for the most part just look like more HTML. This is a different

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Robert Cummings
On Thu, 2006-10-26 at 11:43 +0200, clive wrote: Paul Novitski wrote: It's so interesting that some details bug some people and others bug others. In an expression such as this: echo 'option value=' . $day . '' . $selected . '' . $day . '/option'; or you could write it likes

Re: [PHP] heredoc usage [WAS: OPTION]

2006-10-26 Thread Paul Novitski
At 10/26/2006 08:24 AM, tedd wrote: At 1:04 AM -0700 10/26/06, Paul Novitski wrote: My comparable example (but in an HTML context) would look like: Hello span class=firstNameFIRSTNAME/span, where the engine replaces the content of the span with the value from the database based on a

[PHP] heredoc usage [WAS: OPTION]

2006-10-25 Thread Paul Novitski
At 10/25/2006 04:09 PM, Stut wrote: print 'option value='.$day.''; if ($selected_day_of_month == $day) print ' selected'; print ''.$day.'/option'; On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski wrote: print hdDay