Im trying to read a returned value from getvariable, However, when echo the value I get ‘Array’
Thanks for help
Here’s my code
// Grab a new instance of our phpSpark object
$spark = new phpSpark();
// Set the internal debug to true. Note, calls made to $spark->debug(...) by you ignore this line and display always
$spark->setDebug(false);
// Set the debug calls to display pretty HTML format. Other option is "TEXT". Note, calls made to $spark->debug(...) display as set here
// $spark->setDebugType("HTML");
// Set our access token (set in the phpConfig.config.php file)
$spark->setAccessToken($accessToken);
// Grab the current uptime of your core (requires a modified version of tinker on your Spark Core)
//$spark->debug("Spark Variable");
if($spark->getVariable($deviceID, $atts['variable']) == true)
{
// $spark->debug_r($spark->getResult());
}
else
{
// $spark->debug("Error: " . $spark->getError());
// $spark->debug("Error Source" . $spark->getErrorSource());
$getValue = null;
}
return ($spark->getResult());
}