Re: [PHP] php & html integration

2009-05-15 Thread Bastien Koert
On Fri, May 15, 2009 at 9:38 AM, tedd  wrote:

> At 8:41 AM -0400 5/15/09, Robert Cummings wrote:
>
>> On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote:
>>
>>>  On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote:
>>>  > tedd wrote:
>>>  >
>>>  > >
>>>  > > 
>>>  > > 
>>>  > > 
>>>  > >
>>>  > > and Hello World will be show as a H1 headline.
>>>  > >
>>>  > > Please note, the "()" seen in my use of echo is not necessary --
>>> it's
>>>  > > just another one of those things that I do that no one else does.
>>> It's
>>>  > > not wrong, but it serves no purpose other than it looks good and
>>> makes
>>>  > > sense *to me* YMMV.
>>>  >
>>>  > I do it that way as well.
>>>
>>>  Me too... for require and include also.
>>>
>>
>> Actually, I crossed mental threads there. I do echo without parenthesis
>> but use them on require and include.
>>
>
> Rob et al:
>
> As Ron knows, both include() and echo() are language constructs and not
> functions. As such, parentheses are not needed around their arguments.
>
> However, for sake of readability (mine) and consistency in style (again
> mine) I use parentheses for both. I would fine it disturbing to use
> parentheses for one and not the other.
>
> Cheers,
>
> tedd
>
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
But I always thought you were a bit distubed, tedd...

i am disturbed too, since i do the same thing ;-)

-- 

Bastien

Cat, the other other white meat


Re: [PHP] php & html integration

2009-05-15 Thread tedd

At 8:41 AM -0400 5/15/09, Robert Cummings wrote:

On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote:

 On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote:
 > tedd wrote:
 >
 > >
 > > 
 > > 
 > > 
 > >
 > > and Hello World will be show as a H1 headline.
 > >
 > > Please note, the "()" seen in my use of echo is not necessary -- it's
 > > just another one of those things that I do that no one else does. It's
 > > not wrong, but it serves no purpose other than it looks good and makes
 > > sense *to me* YMMV.
 >
 > I do it that way as well.

 Me too... for require and include also.


Actually, I crossed mental threads there. I do echo without parenthesis
but use them on require and include.


Rob et al:

As Ron knows, both include() and echo() are language constructs and 
not functions. As such, parentheses are not needed around their 
arguments.


However, for sake of readability (mine) and consistency in style 
(again mine) I use parentheses for both. I would fine it disturbing 
to use parentheses for one and not the other.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php & html integration

2009-05-15 Thread Robert Cummings
On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote:
> On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote:
> > tedd wrote:
> > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > and Hello World will be show as a H1 headline.
> > > 
> > > Please note, the "()" seen in my use of echo is not necessary -- it's 
> > > just another one of those things that I do that no one else does. It's 
> > > not wrong, but it serves no purpose other than it looks good and makes 
> > > sense *to me* YMMV.
> > 
> > I do it that way as well.
> 
> Me too... for require and include also.

Actually, I crossed mental threads there. I do echo without parenthesis
but use them on require and include.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php & html integration

2009-05-15 Thread Robert Cummings
On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote:
> tedd wrote:
> 
> > 
> > 
> > 
> > 
> > 
> > and Hello World will be show as a H1 headline.
> > 
> > Please note, the "()" seen in my use of echo is not necessary -- it's 
> > just another one of those things that I do that no one else does. It's 
> > not wrong, but it serves no purpose other than it looks good and makes 
> > sense *to me* YMMV.
> 
> I do it that way as well.

Me too... for require and include also.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php & html integration

2009-05-14 Thread Michael A. Peters

tedd wrote:







and Hello World will be show as a H1 headline.

Please note, the "()" seen in my use of echo is not necessary -- it's 
just another one of those things that I do that no one else does. It's 
not wrong, but it serves no purpose other than it looks good and makes 
sense *to me* YMMV.


I do it that way as well.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php & html integration

2009-05-14 Thread Paul M Foster
On Thu, May 14, 2009 at 04:19:57PM -0400, tedd wrote:




>
> Please note, the "()" seen in my use of echo is not necessary -- it's
> just another one of those things that I do that no one else does.

Ohmygosh! I didn't realize Tedd was one of those "using parentheses with
an echo command" guys. I'm sooo disappointed! 

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php & html integration

2009-05-14 Thread tedd

At 2:35 PM -0400 5/14/09, PJ wrote:

I'm a bit fuzzy on the relationship between the  and the HTML code.
Where should the php code be placed in a page so that execution is
carried out smoothly? So far, my coding has managed to avoid horrendous
snags; but as I delve deeper into the quagmire of coding, I would like
to clear the fog before me.
Perhaps I have been fortunate up to this point... :-)



PJ:

First, do not use  -- that's a short tag and it has been 
depreciated and will not work with xml.


Second, use  instead.

Third, place the php code anywhere you want within the html document 
(top, bottom, middle, and any where). It makes no difference (other 
than readability) -- all of it will be executed before the browser 
see's anything.


Fourth, if you want php to print something along with (inside) the 
html, simply echo() it, such as:






and Hello World will be show as a H1 headline.

Please note, the "()" seen in my use of echo is not necessary -- it's 
just another one of those things that I do that no one else does. 
It's not wrong, but it serves no purpose other than it looks good and 
makes sense *to me* YMMV.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php