On Mon, 22 Jul 2002, B i g D o g wrote:
> I figured that the comma was to concatenate but is was wondering if the
> parser handled it different.
The comma isn't actually for concatenation. The net effect is the same in
this case, but a very different thing is happening.
echo "hello " , "there
on 23/07/02 8:34 AM, B i g D o g ([EMAIL PROTECTED]) wrote:
> What does the "," and "{}" do in this type of statement?
>
> Example: echo "{$strName}", htmlspecialchars( $teststr );
Not sure about the comma, but the {braces} are easy. They help separate the
$vars from other stuff in the strin
ting - never thought of doing that, I alway's broke out of the quotes
to do object dereferencing. Should make my future code more readable I
think...
Martin
-Original Message-
From: B i g D o g [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 9:06 AM
To: PHP GEN
Subject: Re: [
...
.: B i g D o G :.
- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: "B i g D o g" <[EMAIL PROTECTED]>; "PHP GEN"
<[EMAIL PROTECTED]>
Sent: Monday, July 22, 2002 5:00 PM
Subject: Re: [PHP] Comma question
> Curly b
I think someone working on learning php after learning C was a little
too printf() happy :)
-Original Message-
From: B i g D o g [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 3:34 PM
To: PHP GEN
Subject: [PHP] Comma question
Tried to check the archive, but it is offline
OTECTED]>
Sent: Monday, July 22, 2002 4:34 PM
Subject: [PHP] Comma question
> Tried to check the archive, but it is offline...
>
>
> What does the "," and "{}" do in this type of statement?
>
> Example: echo "{$strName}", htmlspecialchars(
$
The comma just concatenates the two. The brackets don't seem to do much of
anything...
echo "$strName".htmlspecialchars( $teststr );
seems to be the same...
PS sorry to everyone who got an eMail with a screwed up time- I forgot to fix
the clock after i re-installed winblows (dual-boot)
--
Tried to check the archive, but it is offline...
What does the "," and "{}" do in this type of statement?
Example: echo "{$strName}", htmlspecialchars( $teststr );
Thanks,
.: B i g D o g :.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
8 matches
Mail list logo