I'm trying to compare a email address held in a PHP variable with a email address held in a short code in Wordpress, this is what I've tried so far:
$email = '[email protected]';
$user_email = do_shortcode('[userinfo field="user_email"]');
echo var_dump(strcmp($user_email, $email) === 0);
But the var_dump always returns false, I'm positive they are the exact same string!
var_dump(strcmp($var, $var2));? Also Check individual string using var_dump.do_shortcodeis not working as expected.<span class="userinfo">[email protected]</span>(withvar_dumpyou would have seen that).