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
In php, how to redirect from one page to another page?
Why is overriding runtime?
What is php sequence?
How to call a php function from another php file?
What are the difference between echo and print?
Tell me what are sql injections, how do you prevent them and what are the best practices?
Is c similar to php?
What are the advantages of triggers in php?
What is the difference between array_merge() and array_merge_recursive() in php?
Explain the difference b/w static and dynamic websites?
What are the Advantages and Application Areas of PHP?
What are php applications?
What is __ invoke in php?
What is the use of mysql_real_escape_string in php?
Tell me how to create a session? How to set a value in session? How to remove data from a session?