Skip to content

PHP code snippet – How convert the string to int in laravel function event?

$num = "3.14";
$int = (int)$num;
$float = (float)$num;
See also  How to take integer input in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

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