Hi,
I am parsing an xml file. I have stored the attributes of the XML file in an array. I am using array_keys to return key values from the array. This function returns only unique values. I have several repeatations of a key in the array, but array_keys fetches only unique values. Is there some other way I can get all the key values?
Please Help
Thanks
Mahesh
[SOLVED] Problem with array_keys
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
note how this works:
outputs
Code: Select all
<?php
$test = array('test'=>1,'test'=>2,'test'=>3);
print_r($test);
print_r(array_keys($test));
?>Code: Select all
Array
(
їtest] => 3
)
Array
(
ї0] => test
)Problem with list
Sorry, the problem is becuase I had used a list to hold values which does not allow duplicate values. How can I enter duplicate values to list?