php function to turn a boolean value to null code example Example: php boolean to string $converted_res = $res ? 'true' : 'false';