php string to int - PHP Views : 478
Tagged in : PHP
0 0
Send mail
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;
?>
By Ramya, On - 2009-10-10



    Login to add Comments .