[PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Matthias Krehl
Hi there! I'd really appreciate a clear statement whether to use better $foo = array('bar' = 'boing'); doWhatSoEver($foo[bar]); or $foo = array('bar' = 'boing'); doWhatSoEver($foo['bar']); Someone to know that? bye Matthias Matthias Krehl [EMAIL PROTECTED] -- PHP General

Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Phil Driscoll
This is the correct format: doWhatSoEver($foo['bar']); If your error reporting level is set high enough, php will complain about $foo[bar] unless you have defined bar as a constant elsewhere. -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com

Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Derek Sivers
I'd really appreciate a clear statement whether to use better $foo = array('bar' = 'boing'); doWhatSoEver($foo[bar]); or $foo = array('bar' = 'boing'); doWhatSoEver($foo['bar']); I had heard someone on the list say that it's always best to use quotes, for the same reason as

Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Phil Driscoll
ROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, February 13, 2001 5:34 PM Subject: Re: [PHP] foo[bar] _or_ foo['bar'] ? I'd really appreciate a clear statement whether to use better $foo = array('bar' = 'boing'); doWhatSoEver($foo[bar]); or $foo = array('bar' = 'boing'

Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread php3
Addressed to: Derek Sivers [EMAIL PROTECTED] "Matthias Krehl" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from Derek Sivers [EMAIL PROTECTED] Tue, 13 Feb 2001 09:31:29 -0800 I'd really appreciate a clear statement whether to use better $foo =

Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Andi Gutmans
- From: Derek Sivers [EMAIL PROTECTED] To: Matthias Krehl [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, February 13, 2001 5:34 PM Subject: Re: [PHP] foo[bar] _or_ foo['bar'] ? I'd really appreciate a clear statement whether to use better $foo =