Viewing Paste 434

Formated Paste

  1. <?php
  2.  
  3. $tests = array(
  4. "123456",
  5. "123456\n",
  6. );
  7.  
  8. foreach($tests AS $test)
  9. {
  10. $good = preg_match('~^[0-9]+$~', $test);
  11.  
  12. echo '"', $test, '" ', $good ? 'is' : 'is not', ' good<br />';
  13. }
  14.  
  15. ?>
Name:
Email:
Code/text to paste:
  • Enable code highlighting
  • Code Language:
  • A duck, cat and a goose walk into a bar. How many animals walked into a bar?:
Highslide for Wordpress Plugin