The eregi () function of PHP differs from ereg () in actual applications. The application method of the function eregi. In fact, the usage of the PHP function eregi () is basically the same as that of ereg. What we want to talk about today is the difference between it and the ereg () function. The following example illustrates the PHP function.
- The application method of the function eregi. In fact, the usage of the PHP function eregi () is basically the same as that of ereg. What we want to talk about today is the difference between it and the ereg () function.
The following example illustrates the differences between the PHP functions eregi () and ereg:
Check whether the abcdef contains uppercase letters C.
- <? Php
- If (ereg ("C", "abcdef ")){
- Echo "through ";
- } Else {
- Echo "error ";
- }
- ?>
// The returned result is: Error
- <? Php
- If (eregi ("C", "abcdef ")){
- Echo "through ";
- } Else {
- Echo "error ";
- }
- ?>
// The returned result is
Ereg () is case sensitive. the PHP function eregi () is case insensitive.
Explain () application method. In fact, the usage of the PHP function eregi () is basically the same as that of ereg. What we want to talk about today is the difference between it and the ereg () function. The following example illustrates the PHP function...