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
Can we use get instead of post?
What is the purpose of basename() function in PHP?
What is the use of mysqli_real_escape_string() function?
What is meant by pear in php? What is the purpose of it?
What is the function of trim?
Explain about PHP filter and why it should be used?
Which is better get or post method?
What does the scope of variables mean?
How to get the total number of values in an array?
What is instantiation?
How to genrate report in wordpress cms
What is the difference between explode() and split() functions?
Write a program to swap two numbers using php.
What is Type hinting in PHP?
How to get a random value from a php array?