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
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
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
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'
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 =
-
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 =
6 matches
Mail list logo