I'm attempting to modify some PHP to suit my needs and I'm having a bit of trouble.
I've created the variable $mutitag
to hold the names of some variables from which I need to fetch some values.
I made a foreach
loop to set $tv
as each value of $multitag
, fetch the values from the database, and return them into $get_tags
. However, when I run the code below it only returns the values from the second value of $multitag
array. How can I correctly concatenate $get_tags
with all of the returned values? Thanks for your help!
$multitag = explode(",", $tv);
if ($tv == '' && !isset($value)) {
return "No template variable for tags was declared.";
}
foreach ($multitag as $tv) {
$get_tags = implode(
$delimiter,
$modx->getTemplateVarOutput($idname=array($tv), $page_id, $published="1")
);
}