simple as 1 == true and 0 == false
if($validation === 1){
$validation = 'valid';
} else {
$validation = 'invalid';
}
have a reading of the php docs on boolean
More Related Contents:
- While loop inserts three times
- PHP Warning: Illegal string offset 'path' & 'title'
- Parse error: syntax error, unexpected ';', expecting ')' in *:\Users\******\******\xampp\htdocs\******\inc\php\arrays.php on line 25 [duplicate]
- Writing PHP functions that has many parameters/modifiers [closed]
- Undefined index: image3
- How to create email notification with login users on PHP an MySQL [duplicate]
- Receive JSON POST with PHP
- How to access object properties with names like integers or invalid property names?
- Security threats with uploads
- How do the PHP equality (== double equals) and identity (=== triple equals) comparison operators differ?
- PHP passing $_GET in the Linux command prompt
- Replace Mcrypt with OpenSSL
- Filter multidimensional array based on partial match of search value
- Warning: Cannot modify header information – headers already sent by ERROR [duplicate]
- php How do I start an external program running – Having trouble with system and exec
- Exception: Serialization of ‘Closure’ is not allowed
- Posting multidimensional array with PHP and CURL
- Unexpected bracket ‘[‘ – PHP [duplicate]
- Best method for sum two arrays [closed]
- Alternative for mysql_num_rows using PDO
- Updating product stock programmatically in Woocommerce 3
- %2F in URL breaks and does not reference to the .php file required [duplicate]
- Laravel app stopped working after upgrading to php 8
- Should I allow ‘allow_url_fopen’ in PHP?
- Checking if 2 arrays have at least 1 equal value [duplicate]
- How to debug PHP code under Linux when just an blank page is shown?
- Change the sender name php mail instead of [email protected]
- Changing WooCommerce cart item names
- Calling a function within a Class method?
- How to install extension for php via docker-php-ext-install?