I have an array, and its large. very large. Its for a real estate company. I would like to split the array into sections based on the number of bedrooms each home has. So ideally all the entries (like the one below) that had 0 bedrooms would be set into one array, and with 1, into another. etc...
Is this possible?
object(SimpleXMLElement)#124 (1) {
["unit"]=>
array(40) {
[0]=>
object(SimpleXMLElement)#246 (1) {
["@attributes"]=> array(28) {
["mlsnumber"]=> string(8) "A1837040"
["type"]=> string(0) ""
["unit"]=> string(3) "607"
["maintenancefee"]=> string(4) "1609"
["price"]=> string(6) "890000"
["salesprice"]=> string(0) ""
["bath"]=> string(1) "1"
["hbath"]=> string(1) "0"
["beds"]=> string(1) "0"
["sqft"]=> string(3) "747"
["sqftm"]=> string(5) "69.40"
["pricesqft"]=> string(8) "1,191.43"
["lat"]=> string(16) "25.7683201213024"
["lng"]=> string(16) "-80.132474899292"
["pricemeters"]=> string(9) "12,824.21"
["pricechange"]=> string(5) "-6.32"
["dom"]=> string(3) "181"
["reo"]=> string(1) "N"
["shortsale"]=> string(1) "N"
["dropprice"]=> string(0) ""
["pets"]=> string(3) "Yes"
["furnished"]=> string(1) "U"
["FloorLevel"]=> string(1) "6"
}
}