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
Define anonymous classes in php7?
Explain the advantages of using PHP?
What is mysql in php?
Write a program to get lcm of two numbers using php?
What is the basic function to search files for lines (or other units of text) that contain a pattern.
What is filter_var?
Do you know what is the function func_num_args() used for?
What happens if an expected input field was not submitted?
What is the use of anonymous function in php?
What is variable give example?
What's the best method for sanitizing user input with php?
What is the function in PHP do not return a timestamp?
What are the advantages of stored procedures?
Why many companies are switching their current business language to php? Where php basically used?
What is scope of variable in php?