Why is my code saying that $publishRequest is undefined. it is really defined in the array
this is just a part of my code but this part is the part where the problem is hiding
already tried above the array:
php
$publishRequest = array()
if($status1=="up") {
$publishRequest = array(
"instance_id" => INSTANCE_ID,
"name" => INSTANCE_NAME,
"group" => INSTANCE_GROUP,
"description" => "Running on Controller.Ligowave.com",
"contents" => array(
array(
"name" => "Status",
"contents" => array(
array(
"icon" => "information",
"type" => "label",
"title" => $name1,
"subtitle" => "Uptime is: " . $uptimetime1
)
)
)
)
);
} else {
array(
"icon" => "error",
"type" => "label",
"title" => $name1,
"subtitle" => "Down since: " . $lastseendate1);
}
try {
echo "<p>Publish</p>";
$publishResponse = request(options, $publishRequest);
echo "<p>".$publishResponse."</p></br></br>";
}
options?$publishRequest = array()without semicolon is a syntax error