jeudi 2 février 2017

Checking if two variables are not empty in PHP

I want to echo variables if either of them aren't empty.

I have written the following PHP but they aren't being shown when the variables aren't empty:

<?php   if(!empty($this->element->videos||$this->element->productdownloads)) {
    echo $this->element->videos; 
    echo $this->element->productdownloads; }
?>

Aucun commentaire:

Enregistrer un commentaire