From the way you've worded your question, as well as some of your comments, it sounds as though you're missing something very important.
PHP directives (like <?php if ...?>
) are interpreted by the server. HTTP clients, such as web browsers and crawlers, only see the output of these directives; content that is not generated as output (e.g, because it is skipped by an if
/else
) is never sent to the client at all, so they cannot possibly detect it.