What is the common issue when trying to convert XML content into an array using PHP?
When trying to convert XML content into an array using PHP, a common issue is that the built-in SimpleXMLElement class does not directly convert XML attributes into array elements. To solve this, you can use the `json_encode` and `json_decode` functions to convert the XML content into a JSON string and then decode it into an associative array.
$xmlString = '<root><item id="1">Item 1</item><item id="2">Item 2</item></root>';
$xml = simplexml_load_string($xmlString);
$json = json_encode($xml);
$array = json_decode($json, true);
print_r($array);