I have a plugin that’s grabbing an array and mapping the values to variables that can be output on demand. EVerything working find in the plugin itself, but the automatic variables like switch, count and total_count arn’t working. They are just printed to the screen when I try and include them.
Here’s the code:
$count = 0;
$output = '';
if (isset($results['list'])){
print_r("The Query Worked");
foreach($results['matching_chapar'] as $row){
$variable_row = array(
'name' => $row['name'],
'phone' => $row['phone'],
'email' => $row['email'],
'url' => $row['url'],
'address' => $row['address']
);
$output .= $this->EE->TMPL->parse_variables_row($tagdata, $variable_row);
}
}
else{
$output = "Query Failed";
}
return $output;Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.