Welcome Guest, Not a member yet? Register   Sign In
What's the difference?
#4

[eluser]John_Betong[/eluser]
[quote author="gypmaster" date="1298671429"]Thanks John ...

... I meant what's the difference operationally?

Why would I want to loop through the $q->result and build an array from it?

Isn't that slower?[/quote]

The loop splits the array then iterates which will add additional unnecessary processing.

I use it to create a formatted block by adding line breaks, bold, tabbing, etc which I know is very naughty as far as MVC is concerned since formatting should be done in the view. It makes it easy to echo the $result in a view so much easier.
 
 
 


Messages In This Thread
What's the difference? - by El Forum - 02-25-2011, 02:52 AM
What's the difference? - by El Forum - 02-25-2011, 06:41 AM
What's the difference? - by El Forum - 02-25-2011, 10:03 AM
What's the difference? - by El Forum - 02-25-2011, 10:19 AM
What's the difference? - by El Forum - 02-25-2011, 10:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB