title: How to convert string variable to integer in php?
body: <p>I'm very new to php .I want to convert the string to integer value.</p>
  
  <p>I used following code to convert </p>
  
  <pre><code>$val='(100*2)';
  echo (int)($val); //This will showing output as 0
  </code></pre>
  
  <p>But <code>echo (int)((100*2)); /This will showing output as 200</code></p>
  
  <p>Please help me any one to solve this .Thanks advance</p>