i know it use much resources if you use too many 'for' loop

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dilbert
Forum Newbie
Posts: 10
Joined: Mon Mar 10, 2003 8:34 am

i know it use much resources if you use too many 'for' loop

Post by dilbert »

but how many loop mean 'too many' , it is too much if I am using it 300(loop 300 times) ?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

It's got to depend on what you've got in the loop.

Mac
dilbert
Forum Newbie
Posts: 10
Joined: Mon Mar 10, 2003 8:34 am

Post by dilbert »

if I only getting some data form database and do some simple calculation, does it need much resources?
pootergeist
Forum Contributor
Posts: 273
Joined: Thu Feb 27, 2003 7:22 am
Location: UK

Post by pootergeist »

8O you're querying the database 300 times? 8O

show us the code - perhaps we can suggest a better approach.
Post Reply