Author Topic: Difference between Each and foreach in PHP  (Read 23076 times)

Savera

  • Full Member
  • ***
  • Posts: 159
Difference between Each and foreach in PHP
« on: March 16, 2012, 05:15:21 AM »
Hi

I am well aware of foreach command in php, its short and better way to make use of loops in php instead of using for( , however I see each also in php which says shows current key and value then move array pointer to next then what is difference between foreach and each ?

 

X

Do you know?

IfAndBut.com gives you a platform where you can ask questions related to web and internet..
So, why wait..
Join Now!
anything

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back