echo $link['Theme'];
if(empty($link['Theme']))
global $Theme;
{ echo $Theme; };
if(empty($Theme))
{ echo 'default'; };
$link pulls data from the database. $Theme is an optional variable on a higher page that I would really like to have as an override for the Theme stored on the database.
Currently, I set it up to print the $Theme if the Theme from the database is NULL.
I tried adding another if statement for if there was no value in $Theme, it would simply print ‘default’ to load the default design.
Currently the last if statement makes it print $link['Theme'} + default (like spacedefault instead of just space or default)
Can someone help me with this? I’m not great at php yet. Thanks!
I believe you’re looking for the following conditionals
Here it is in two lines of code, if you’re looking to use inline conditionals