adding if statment kills\ignores the html
-
I tried consulting in other forums and in this one but no one knows how to resolve this:
when adding an “if(!empty($data))” php statement the html is ignored. for example:
<a href="https://<?php bp_member_profile_data('field=facebook'); ?>" title="My facebook"> <img src="images/facebook.png" alt="facebook" /> </a>
in any form of syntax I used when adding if before it the outcome is only the field data without all the html.
for example: adding if like that:
<?php $Usr_Url = bp_member_profile_data('field=facebook'); if ( $Usr_Url != "" ) { ?> <a href="https://<?php bp_member_profile_data('field=facebook'); ?>" title="My facebook"> <img src="images/facebook.png" alt="facebook" /> </a> <?php } ?>
Displayed only the fields data and ignore all html but if like on first case liek I wrote the all html is displayed.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘adding if statment kills\ignores the html’ is closed to new replies.