php 1 0 to boolean code example Example: php boolean to string $converted_res = $res ? 'true' : 'false';