Jump to content

centohi

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by centohi

  1. When $dateStr is assigned the value "2007-11-01" (as an example), does anyone have any ideas why this code always echoes "bad". What am I doing wrong? if (preg_match("/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/", $dateStr) == TRUE) { echo "good"; } else { echo "bad"; }
×
×
  • Create New...