what is the diffrence between for and foreach?
Answer Posted / swapnil
well when we use for loop it will execute only for the time
we have mentioned in loop ie ex for(i=0;i<25;i++) 25 times
whereas foreach is used only when we dont know that limit it
may be the case when we perform operation on database queries
Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
Tell me what is the meaning of a final class and a final method?
What is the difference between apache and tomcat?
How do you explain independent and dependent variables?
Tell me what is the main difference between require() and require_once()?
How to get complete current page url in php?
How can we enable error reporting in php?
What is singleton design pattern in php?
What is crypt () in php?
What is helper library?
What is member variable?
What are differences between PECL and PEAR?
How easy is php?
Why is overriding runtime?
What is "echo" in php?
Why would we use === instead of ==?