Home  >  Q&A  >  body text

Why don’t you use or or || in the middle?

if((!isset($error)) and (!ereg("^[_0-9a-z]*$",$nicker))) $error="The nickname needs to be composed of letters, numbers and underscores ";


小周小周2303 days ago1170

reply all(1)I'll reply

  • 无忌哥哥

    无忌哥哥2018-07-17 09:42:21

    This means both must be judged, not just one, so using and and or are used to judge only one condition.

    reply
    0
  • 小周

    Um thank you

    小周 · 2018-07-17 09:45:42
  • Cancelreply