PHP Classes

File: exemple.php

Recommend this page to a friend!
  Classes of Jordi Girones  >  CheckRegExp  >  exemple.php  >  Download  
File: exemple.php
Role: Example script
Content type: text/plain
Description: Exemple of use
Class: CheckRegExp
Validate values with regular expressions
Author: By
Last change:
Date: 13 years ago
Size: 576 bytes
 

Contents

Class file image Download
<?php
include('CheckRegExp.php');

function
echoLine($string,$html=true){
   
$del = $html?"<br />":"";
    echo
$string.$del;
}

echoLine("CORREO: ".CheckRegExp::checkMail("jordigirones@gmail.com"));
echoLine("IP: ".CheckRegExp::checkIP("192.168.12.31"));
echoLine("HEX COLOR: ".CheckRegExp::checkHexColor("#336AA9"));
echoLine("HEX NUMBER: ".CheckRegExp::checkHexNumber("336AA9"));
echoLine("INTEGER: ".CheckRegExp::checkInteger("12345"));
echoLine("FLOAT: ".CheckRegExp::checkFloat("12345.6789"));
echoLine("USER: ".CheckRegExp::checkUsername("jgirones"));


?>

For more information send a message to info at phpclasses dot org.