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
What does $_cookie mean?
Which software is used to run php programs?
What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
What is Different between Joomla And Magento?
What is the use of return in php?
Can we extend multiple classes in php?
Tell me what is the use of "ksort" in php?
How to access a specific character in a string?
How is a session id generated?
What is mysql in php?
What are examples of independent and dependent variables?
Is php a mvc?
How can you retrieve data from the mysql database using php?
Where is the submitted form data stored?
What is local variable in php?