P粉8645949652023-08-25 00:21:20
If your query does not return a row, then your variable $Row will be filled with false, So you can test whether the variable has a value before trying to access any index inside the variable:
if($Row){ if(is_null($Row['Data'])) { $session_data = ''; }...
P粉7703754502023-08-25 00:04:34
Easy to use PHP ??
Null coalescing operator
return $Row['Data'] ?? 'default value';
Or you can use
like this$Row['Data'] ??= 'default value'; return $Row['Data'];