|
Posted by Tom on 05/30/07 18:29
On 30 May 2007 10:20:56 -0700, L. Berger wrote...
>
>Hi,
>
>I am working on an HTML template which has a lot of html tags, with
>PHP data shown in the middle of these tags -- you know, the usual.
>Currently, I have HTML as is, and many many "echo $variable"
>statements mixed in as PHP code.
>
>My question: should I leave it like this, with ECHO statements
>embedded within the tags,
>
>Or
>
>Should I concatenate the HTML within single quotes (single quotes are
>supposed to be faster in PHP than double quotes) and the display data
>as variables, and then ECHO that one concatenated string?
>
>Any experiences or pointers would be great!
>
>Thanks
>LB
>
From my understanding PHP would see a single-quoted string of text as a block of
text or a single variable, but double-quoted text may have other variables
inside.
Depending on the volume that PHP would need to parse in a document, you may or
may not notice a difference. For future purposes though it may be worth using
the single-quotes when applicable.
Tom
--
Newsguy.com - Unlimited Accounts
Now with 32 concurrent connections
Navigation:
[Reply to this message]
|