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 SNIP 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

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 .

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 of .

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

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 acceptable to use

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 =

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 =

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