video #26 - Advance PHP | Foreach / Preg_match

7 months ago
19

The ‘foreach’ loop again. It is use to loops through a block of code for each element in an array. You use a regular expression to search for a pattern in your string or data from a form. A “preg_match” statement is a sequence of characters that forms your search pattern. You use a regular expression to do a case-insensitive search by adding the ‘i’ qualifier. It returns whether a match was found in a string. It will return ‘1’ if it found a match.

Loading comments...