title: defining alphabets as numbers not working inside loop
body: <p>Please check my code below,it returns 0 while I am expecting a result 14.But when I add <code>A+D</code> manually it returns 5.Am i doing something wrong inside the loop ?</p>
  
  <pre><code>&lt;?php
      define('A',1);
      define('B',2);
      define('C',3);
      define('D',4);
      define('E',5);
  
      //echo A+D; returns 5
  
      $name = 'EACE';
  
      $len = strlen($name);
  
      for($i = 0; $i&lt;=$len; $i++)
      {
          $val += $name[$i]; 
      }
      echo $val;   //returns 0
  
  ?&gt;
  </code></pre>