I am doing a ticket booking website, which fetches xml results via a SOAP request in PHP. The results are then returned in the form of PHP object array. And then I display those results using PHP. In one request there are over 300 results returned. So I need to build a show by price : low to high or high to low options for the end user. I have very little experience with PHP array objects, can any one please suggest the options that I can look into for this kind of sorting?
I was thinking of storing all the results to database table then sort then using SELECT query but since there would be many searches each day and each search resulting in at-least 300 entries would make the database very bulky very soon. Is there a way to store searches temporarily inside a database?
Thank you for taking your time in reading this. I will be happy to provide any further explanation if question above is not clear to anyone.
Here is an example of my data:
Array (
[0] => stdClass Object (
[Id] => HS
[Code] => CAUMJM
[Status] => InstantConfirmation
[Price] => 87
[Tax] => 0
[SalePrice] => 0
[currency] => USD
[Type] => Guest Only
[guests] => Array (
[0] => stdClass Object (
[Category] => Standard for 1 guest
[number] => Array ( [0] => stdClass Object ( [Type] => A[age] => 30 ) )
[totalRate] => 87
[ratesPerHour] => Array ( [0] => stdClass Object ( [date] => 2014-08-20 [amount] => 87 ) )
)
)
)
)