Learn PHP foreach Loop to iterate through Arrays
The foreach is a type of loop that is used to loop through array elements. Text Tutorial Link: https://www.tutorialscollection.com/how-to-print-php-array-by-using-foreach-array-print-echo-and-print_r/
In PHP, the foreach is used to loop arrays. The foreach loop passes the value of the current element which is assigned to $value while array pointer is moved to the next element.
source