php convert value to integer code example Example: convert to int php $myintvariable = intval($myvariable);