PHP Convert Boolean to String

Posted on March 2, 2020 at 12:34 pm

You can convert a PHP boolean (true/false) into a string:

$test_bool = var_export(filter_var($_GET['test_bool'], FILTER_VALIDATE_BOOLEAN), true);

Receive updates via email

Other Posts

Updated Posts