addin if statment kills 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="http://<?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="http://<?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.
- The topic ‘addin if statment kills the html’ is closed to new replies.