Hi everyone,
Having difficulty comparing two strings (Inside variables) in php.
I have tried several methods, one being strcmp but I think I was doing that incorrectly, and now the simple === / == comparison methods.
Here is the code:
<?php
if ($pubinfo_username === $currentuser) {
echo "<img alt=\"Remove this post\" height=\"20\" src=\"../images/btns/x.png\" width=\"25\">";
} else {
}
?>
That is the simple === strict comparison between strings, personally I see no reason as to why this doesn't work, but clearly something is wrong.
Any help is much appreciated!
Cheers, Jack.