Define variable and read its value
-
Hi, I want to make snippets conditional, depending on which site they are running. My approach was to set a variable depending on which site they are running on. But it looks like I can’t just set a variable and read its value later because the value is not processed.
The snippet looks like this:
$siteID = 0;
function whatever() {
global $siteID;
if ($SiteId = 0) {
do something;
} else {
do something different;
}
return $result
}Thanks for your advice ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Define variable and read its value’ is closed to new replies.