rory

php how to efficiently loop over nested array?

Posted 6 months ago by rory

I have this array coming out to a database query. Which is the best way to loop over it?

array(5) { [0]=> array(1) { ["url"]=> string(56) "http://www.blabla.org/65" } [1]=> array(1) { ["url"]=> string(67) "http://www.blabla.org/46247" } [2]=> array(1) { ["url"]=> string(54) "http://www.blabla.org/1234" } [3]=> array(1) { ["url"]=> string(53) "http://www.blabla.org/56789" } [4]=> array(1) { ["url"]=> string(57) "http://www.blabla.org/34456" } }

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.