简体   繁体   English

如何-如果显示属性上的If语句

[英]How to - If statement on Display Property

This displays the company logo 显示公司徽标

{display property='Logo' object_sid=$user_sid}

However how would I get it to say if they have a logo display it if not dont display something. 但是,如果他们有徽标,我将如何说呢?

Thanks for any help. 谢谢你的帮助。

An if-else statement checks for a given condition at first, if fulfilled moves to the very first part or else goes to the other part. 如果满足,则if-else语句首先检查给定条件,如果满足则移至第一部分, else转到另一部分。

An Example: 一个例子:

<?php
    $display_property = "Logo";
if(isset($display_property)){
    echo $display_property;
}else
{
    echo "No display";
}
?>

Note: Given with the Information in your question, this example was created. 注意:考虑到您的问题中的“信息”,因此创建了此示例。 However this might not do the EXACT thing but would play a vital role in understanding what you're struggling with. 但是这可能不是做确切的事情,但会理解你挣扎什么起着至关重要的作用。

PHP Manual: else-If condition PHP手册:else-If条件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM