RE: [PHP] Parse error: parse error, expecting `']'' in

2004-12-02 Thread Matthew Sims
>> 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

RE: [PHP] Parse error: parse error, expecting `']'' in

2004-12-02 Thread Ford, Mike
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[

RE: [PHP] Parse error: parse error, expecting `']'' in

2004-12-02 Thread Ford, Mike
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

RE: [PHP] Parse error: parse error, expecting `']'' in

2004-12-02 Thread Ford, Mike
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[

Re[2]: [PHP] Parse error: parse error, expecting `']'' in

2004-12-02 Thread Richard Davey
Hello Robert, Thursday, December 2, 2004, 1:21:33 PM, you wrote: RS> Unfortunately?? I knew exactly where the code was breaking (the RS> lines I posted) since before I added those lines of code the RS> script worked without any problems. But what I don't understand is RS> why sometimes '$_POST[va

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-02 Thread Robert Sossomon
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.

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Richard Lynch
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

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Matthew Sims
> 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]','$

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Thomas Munz
> 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

[PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Robert Sossomon
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]','$_POST[County]','$