Hi all, I have a mysql query which spits out the following:
Array
(
[0] => stdClass Object
(
[bid] => 18
[name] => Cafe Domingo
[imageurl] => sp_domingo.gif
[clickurl] => #
)
[1] => stdClass Object
(
[bid] => 19
[name] => Industrial Sweeping Services
[imageurl] => sp_iss.gif
[clickurl] => http://www.industrialsweeping.com.au/
)
[2] => stdClass Object
(
[bid] => 22
[name] => Melbourne Food Distributors
[imageurl] => sp_mfd.gif
[clickurl] => http://www.campbells.com.au/
)
[3] => stdClass Object
(
[bid] => 26
[name] => Toyota Chadstone
[imageurl] => sp_toyota.jpg
[clickurl] => http://www.chadstonetoyota.com.au/
)
[4] => stdClass Object
(
[bid] => 15
[name] => Bay Corporate Catering
[imageurl] => sp_baycorp.gif
[clickurl] => http://www.baycorporatecatering.com.au/
)
[5] => stdClass Object
(
[bid] => 24
[name] => Steve Wilby Transport
[imageurl] => sp_swilky.gif
[clickurl] => http://www.stevewilby.com.au/
)
[6] => stdClass Object
(
[bid] => 17
[name] => Cody Gems and Jewellery
[imageurl] => sp_cody.gif
[clickurl] => #
)
[7] => stdClass Object
(
[bid] => 21
[name] => Matthew Davis Australia Pty Ltd
[imageurl] => sp_matthewdavis.gif
[clickurl] => http://www.matthewdavis.com.au/
)
[8] => stdClass Object
(
[bid] => 25
[name] => Tom the Lumberjack
[imageurl] => sp_tom.gif
[clickurl] => http://www.redwoodgardens.com.au/
)
[9] => stdClass Object
(
[bid] => 16
[name] => Bendigo Bank
[imageurl] => sp_bb.gif
[clickurl] => http://www.bendigobank.com.au/
)
[10] => stdClass Object
(
[bid] => 14
[name] => 360South Pty Ltd
[imageurl] => sp_360south.gif
[clickurl] => http://www.360south.com.au/
)
[11] => stdClass Object
(
[bid] => 23
[name] => Redwood Gardens Chinese Restaurant
[imageurl] => sp_redwood.gif
[clickurl] => http://www.redwoodgardens.com.au/
)
)
Is it at all possible to then split that array into 4 arrays? With an equal amount of items in each array (as best as possible) but able to be dynamic as more information is put into the dbase).. So if there's an uneven amount, the last array has less?
If that makes sense?