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
How to turn on the session support in php?
What is the difference between get and post in php?
Does https prevent csrf?
Do you know how to declare an array in php?
What does $this do in php?
How to replace a substring in a given string in php?
Is session a cookie?
What is the use of array_count_values() in php?
What are the features of php 7?
What is a persistence cookie?
What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
Why do we use polymorphism in php?
How can I learn php fast?
"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.
How many types of functions are there in php?