Skip to content

How to convert string to int in PHP laravel?

$num = "3.14"; 
$int = (int)$num;//string to int
$float = (float)$num;//string to float
See also  CSS code snippet - How to center an overlay button transform and translate?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.