validate names regex php 1

validate names regex php

preg_match("/^([a-zA-Z' ]+)$/","Given_Name");

Here is what the above code is Doing:
1. The first line is a comment.
2. The second line is a variable declaration.
3. The third line is a function declaration.
4. The fourth line is a function call.
5. The fifth line is a regular expression.

Similar Posts