Can a return function be writen inside a loop?

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
pushkarbucks
New php-forum User
New php-forum User
Posts: 1
Joined: Sat May 25, 2019 7:26 am

Sat May 25, 2019 7:30 am

Capture.JPG
Capture.JPG (15.61 KiB) Viewed 1250 times
Capture.JPG
Capture.JPG (15.61 KiB) Viewed 1250 times
Capture.JPG
Capture.JPG (15.61 KiB) Viewed 1250 times
Can a return function be writen inside a loop?
User avatar
hyper
php-forum GURU
php-forum GURU
Posts: 848
Joined: Mon Feb 22, 2016 5:52 pm

Sat May 25, 2019 11:40 am

To answer the question literally, and as you have already found, there is nothing stopping you from doing it, and as you have probably found out - it doesn't complete the loop and only iterates once.

Have a read of this
Post Reply