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
Is python easier than php?
Is null or empty c#?
What is a model in php?
How many data types are there in php?
Can constructor be private in php?
Is php faster than javascript?
Can we run php in apache tomcat?
How will you calculate days between two dates in PHP?
When a conditional statement is ended with an endif?
Tell me what is the main difference between php 4 and php 5?
How to set a page as a home page in a php based site?
What is the differences between $a != $B and $a !== $B?
What does the unset() function means?
What is php session start?
How to list all values of submitted fields?