>> So when using arrays with string keys within strings you need to
>> concatenate it.
>>
>> $var = "I live in the city of ". $_POST['cityname'];
>
> No, you do not *need* to -- it is one option, certainly, but there is no
> necessity about it.
>
> Within double-quoted strings, it is perfectly acce
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 02 December 2004 13:22, Robert Sossomon wrote:
> But what I don't understand is why sometimes
> '$_POST[variable]' works and why
> sometimes it will only work when it is '$_POST[
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 02 December 2004 16:49, Matthew Sims wrote:
> > > So when using arrays with string keys within strings you need to
> > > concatenate it.
> > >
> > > $var = "I live in the city
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 01 December 2004 19:29, Matthew Sims wrote:
>
> So when using arrays with string keys within strings you need to
> concatenate it.
>
> $var = "I live in the city of ". $_POST[
Richard Lynch is quoted as saying on 12/1/2004 2:57 PM:
Robert Sossomon wrote:
Parse error: parse error, expecting `']'' in file.php
Unfortunately?? I knew exactly where the code was breaking (the lines I posted)
since before I added those lines of code the script worked without any problems.
Robert Sossomon wrote:
> Parse error: parse error, expecting `']'' in file.php
First, some minor nits with other posters :-)
1. While it's true that integer and string keys are handled differently in
some cases, it has absolutely no bearing when the array reference is
buried in a string.
2. The
> Parse error: parse error, expecting `']'' in file.php
>
> I've been working on this script, and can't see why it fails here, but I
> have
> another page that uses the same coding and it works correctly.
>
> OK, here's the code:
> $cart1 = "";
> $cart1 =
> "'$_POST[nutrition_program_assistant]','$
> Parse error: parse error, expecting `']'' in file.php
>
> I've been working on this script, and can't see why it fails here, but I
> have another page that uses the same coding and it works correctly.
>
> OK, here's the code:
> $cart1 = "";
> $cart1 =
> "'$_POST[nutrition_program_assistant]','$_P
8 matches
Mail list logo