I have a strange problem; I have a variable, as follows:
$postBSGlobal = $post['Post']['B/S']
Which, when debugged, correctly delivers
"B"
But, later on the value magically changes to
"1"
Without me manipulating the variable in any way.
I need the string-value for this statement:
if ($userId <> $post['Post']['OWNER'] && $postBSGlobal = 'B'){
echo "Dein Verdienst:";
};
Today my app is completely unusable due to this problem. Maybe the PHP-version on my managed server has changed? How can I prevent PHP from returning the "1"?
You used a single = instead of ==. Change it to:
$postBSGlobal == 'B'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.