php string to int
by Ramya[ Edit ] 2009-10-10 09:42:54
php string to int:
To convert php string to int we need to follow type casting. Just use (int) before a variable name or string name.
Use:
(int)string name
For example:
<?php
$str = "10897";
$num = (int)$str;
?>