werushka Posted May 7, 2008 Share Posted May 7, 2008 Hi everyone I have a code like this <?php print $node->content['field_etkinlik_zaman']['#value'] ?><br></br> if the field is emty <br></br> makes whitespace I want to edit the code so if the value is null that the <br></br> are hidden tooo. I would really appreciate any help Link to comment https://forums.phpfreaks.com/topic/104545-simple-hide-when-null-question/ Share on other sites More sharing options...
rhodesa Posted May 7, 2008 Share Posted May 7, 2008 <?php if(strlen($node->content['field_etkinlik_zaman']['#value'])) print $node->content['field_etkinlik_zaman']['#value'] . '<br></br>'; ?> Link to comment https://forums.phpfreaks.com/topic/104545-simple-hide-when-null-question/#findComment-535164 Share on other sites More sharing options...
Fadion Posted May 7, 2008 Share Posted May 7, 2008 Just write it < br /> without the spaces, theres no need to close it with an ending tag. Link to comment https://forums.phpfreaks.com/topic/104545-simple-hide-when-null-question/#findComment-535178 Share on other sites More sharing options...
werushka Posted May 7, 2008 Author Share Posted May 7, 2008 <?php if(strlen($node->content['field_etkinlik_zaman']['#value'])) print $node->content['field_etkinlik_zaman']['#value'] . '<br></br>'; ?> sweet thanks Link to comment https://forums.phpfreaks.com/topic/104545-simple-hide-when-null-question/#findComment-535183 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.