title: Username must begin with a letter - PHP
body: <p>My objective is to let the form warn a user if the username input does not start with a letter. Unfortunately, the condition is still true despite the entered username starting with a letter.</p>
  
  <p>The code below is the variable which contains an array for storing all 26 both uppercase and lowercase letters.</p>
  
  <pre><code>$alphas = array_merge(range('a', 'z'), range('A', 'Z'));
  </code></pre>
  
  <p>Then the code below is used to output the error message.</p>
  
  <pre><code>if (empty($username)){
      array_push($errors, "*Username cannot be blank&lt;br&gt;");
  }else if(!preg_match("/^[a-zA-Z0-9_]*$/",$username)){
      array_push($errors, "*Username can only contain alpha-numeric characters or an underscore&lt;br&gt;");
  }else if($username[0] !== $alphas){
      array_push($errors, "*Username must begin with a letter&lt;br&gt;");
  }
  </code></pre>
  
  <p>The condition is "if($username[0] !== $alphas)", however it keeps returning <strong><em>TRUE</em></strong>, meaning it will show the message "*Username must begin with a letter" regardless the first letter of the username input. </p>
  
  <p>How can I get through this problem?</p>