title: How to check if a string contains only letters in PHP?
body: <p>I want to write a PHP code which checks whether a variable contains only letters NOT characters not numbers, I have typed this but it's not working:</p>
  
  <pre><code>$myVar = "Var#iable5";
  
  ereg(^[a-zA-Z] , $myVar)
  </code></pre>