Find your content:

Search form

You are here

how to convert string to integer php?


Using intval() and floatval() Function. The intval() and floatval() functions can also be used to convert the string into its corresponding integer and float values respectively.

echo intval($num);  
echo floatval($num); 

My Block Status

My Block Content