vendredi 31 août 2018

IF variable is set then show variable not working

I have written some PHP code, which shows an author alias if the variable is set, if not it shows the author.

I've written the following code, but it's not working.

The site is running PHP 5.3.10

    <?php if (!empty($author_alias)) { 
        echo $author_alias 
    }

    else {
        echo $this->item->author;
    } ?>

Aucun commentaire:

Enregistrer un commentaire