Answer the question
In order to leave comments, you need to log in
Display the matching string from $?
The $data variable can have two options.
either character set kfjnbx8rkj4nh......
or "key not found".
You need to compare the options and display if "key not found" appears.
Seems like a simple question, but I'm confused with these if,else, ==, !=
Answer the question
In order to leave comments, you need to log in
If we are talking about php:
if( (empty($data) && $data!='0' ) || mb_strtolower( trim( $data ) ) == 'ключ не найден' ){
// если нет ключа или не найден...
}else{
//если ключ есть...
}
$result = (empty($data) && $data!='0' ) || mb_strtolower( trim( $data ) ) == 'ключ не найден' ? 'Нет' : 'Есть';
echo $result;
if( (!empty($data) || $data=='0') && mb_strtolower( trim( $data ) ) != 'ключ не найден' ){
//если ключ есть...
}else{
// если нет ключа или не найден...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question