ID:               35501
 Updated by:       [EMAIL PROTECTED]
 Reported By:      robing9 at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Windows XP SP2
-PHP Version:      5CVS-2005-12-01 (snap)
+PHP Version:      5.0.4
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




Previous Comments:
------------------------------------------------------------------------

[2005-12-01 12:40:10] robing9 at yahoo dot com

Description:
------------
I am working with a uniserver with  Apache 2.0.54, ActivePerl
5.8.7.813, PHP 5.0.4, MySQL 4.1.12a, phpMyAdmin-2.6.3-rc1 

When I stored some data in a array with key field in integer but in a
jumbled manner (insted of 1,2,3,4 as the key values i gave 0,1,4,2,3).
Then when i printed it using the print_r function I got the data in the
order of the key values 0,1,4,2,3.
But shouldn't it have come in the order 0,1,2,3,4?

I have written the code below.
********************************
PS : I couldnt find a relevant PHP version so I selected 5CVS
2005-12-01(snap)

Reproduce code:
---------------
<?php
$x[0] = 'robin';
$x[1] = 'tony';
$x[4] = 'Sini';
$x[2] = 'pradeep';
$x[3] = 'prem';

print_r($x);
?>



Expected result:
----------------
Array ( [0] => robin [1] => tony [2] => pradeep [3] => prem [4] => Sini
) 

Actual result:
--------------
Array ( [0] => robin [1] => tony [4] => Sini [2] => pradeep [3] => prem
) 



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35501&edit=1

Reply via email to