what is the diffrence between for and foreach?
Answer Posted / krunal gohel
for loop is to do something over and over again until the
task has been completed.
foreach works only on arrays. even it will run the loop
until end of the array.
Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
What is constructors and destructors?
How can you compare objects in php?
What is ci in php?
Explain the three different kinds of Arrays?
What is polymorphism in php?
What is php dependency injection?
How do you destroy a session?
Explain php explode() function.
What is the interface in php?
Difference between array_combine and array_merge?
How do I run a php file?
What is the difference between Split and Explode in PHP?
What is mean by an associative array?
Do you know what does mvc stand for and what does each component do?
Why do you need to filter out empty files?