Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array[$i] = '';
Br
Tanel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Jun 08, 2010 at 04:12:42PM +0300, Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
If the index for (integer) 3, the first example is correct. If the index
is (string) '3', the second example is correct.
$i = 7;
$array[$i] = '';
On Tue, 2010-06-08 at 16:12 +0300, Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array[$i] = '';
Br
Tanel
The two indexes are equivalent, although I reckon the integer one will
give better
Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array[$i] = '';
Sometimes it is good to illustrate the correct answer:
?php
$array = array
(
'1' = '1',
'2' = '2',
'three' = 'three',
'4.0'
On Tue, 2010-06-08 at 09:38 -0400, Robert Cummings wrote:
Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array[$i] = '';
Sometimes it is good to illustrate the correct answer:
?php
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote:
Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array[$i] = '';
Sometimes it is good to illustrate the correct answer:
?php
$array = array
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote:
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote:
Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array[$i] = '';
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote:
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote:
Tanel Tammik wrote:
Hi,
which one is correct or better?
$array[3] = '';
or
$array['3']
On Tue, 2010-06-08 at 16:44 +0200, Peter Lind wrote:
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote:
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote:
Tanel Tammik wrote:
Hi,
which
On 8 June 2010 16:53, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 16:44 +0200, Peter Lind wrote:
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote:
On Tue, Jun 08, 2010 at 09:38:58AM
On Tue, 2010-06-08 at 17:11 +0200, Peter Lind wrote:
On 8 June 2010 16:53, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 16:44 +0200, Peter Lind wrote:
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 10:35 -0400,
On Tue, Jun 08, 2010 at 04:44:53PM +0200, Peter Lind wrote:
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote:
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote:
Tanel Tammik wrote:
Hi,
Paul M Foster wrote:
On Tue, Jun 08, 2010 at 04:44:53PM +0200, Peter Lind wrote:
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote:
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote:
Tanel Tammik
13 matches
Mail list logo