Passing a void to be used in an pChart object
Posted: Tue Apr 12, 2011 12:03 pm
Although I'm working with pChart in this example I'm thinking this is a PHP question.
pChart uses arrays like this
The voids are breakpoints in the graphs.
I'm trying to pass the VOID to addPoints in a function like below. Doing so seems to put the VOID in the array as a string and as you can see from the code above this doesn't work.
I understand if this is a pcart issue and not a direct php question but any help would be great!
Thanks
Lee
pChart uses arrays like this
Code: Select all
$MyData->addPoints(array(VOID,VOID,VOID,VOID,900,890,800,780,500,600,400), Data); I'm trying to pass the VOID to addPoints in a function like below. Doing so seems to put the VOID in the array as a string and as you can see from the code above this doesn't work.
Code: Select all
temperature[] = 'VOID';
$temperature[] = 'VOID';
$temperature[] = 'VOID';
$temperature[] = '20';
$temperature[] = '10';
$temperature[] = '50';
$temperature[] = '30';
exampleg($temperature);
function exampleg($temperature )
{
$MyData->addPoints($temperature, "Data");
}Thanks
Lee