Results 1 to 2 of 2

Thread: How to validate data?

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to validate data?

    I can use whether REGEX expressions or FILTER_VAR

    Can you show some samples or maybe do you know better techniques?

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <?php
    $string = "Match this string";

    var_dump(filter_var($string, FILTER_VALIDATE_REGEXP,
    array("options"=>array("regexp"=>"/^M(.*)/"))))
    ?>

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •