what is the diffrence between for and foreach?

Answer Posted / ks.tarun

FOR loop will continue until some condition fails, but in
case of foreach loop will work until all item are processed.

Is This Answer Correct ?    18 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why php is used in html?

719


Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()

2102


Tell me how do I escape data before storing it into the database?

776


Does php have a future?

744


What is php glob?

789


Which is true about the singleton design pattern?

748


Why die is used in php?

786


Tell us how can we display the output directly to the browser?

834


What is an associative array?

775


Explain array_uintersect()?

794


Does php need html?

748


How can a cross-site scripting attack be prevented by php?

764


Is php fully object oriented?

691


What is __ invoke in php?

692


What are form input html tags?

756