php - How to write "if something -> print" "else if nothing -> print nothing" -
I am writing a PHP function for WordPress executed through an XML feed. So we are leaving a feed and then on our website are based on those nodes. Whom I need help with, we have a bunch of different images of credentials (i.e. BBB, Chamber of Commerce etc.), so I need it When there is a link to a BBB, it should display the picture, if not, then it should be empty. The problem I am running is because BBB links will be random based on different businesses. Any help would be greatly appreciated. Thank you.
If the URL "picture" and "any picture"
Do you mean is? Otherwise please tell your problem better.
if (empty ($ url)) {echo '& lt; Img src = "'. $ Url.'" / "Gt; ';} Else {echo' ';}
check when is empty
incorrect (and therefore ! Empty
is true
) and actually consider that it fits your needs.
Comments
Post a Comment