Jump to content

Array


rashmi_k28

Recommended Posts

Hi,

 

Based on the value passed from the check box, I have to plot a graph querying the database.

 

Suppose if I check 2 boxes, two values are passed and I have to plot the linegraph for 2 parameters in the single graph i.e the accumulated graph.

 

How to querying Sql statements I know but I have no idea how to store the values and separate it into two different arrays.

 

function getValues() {

$value=arrays();

 

if($option==1){

$sql="select bd from table1";

}

 

if($option==2){

 

$sql="select bw from table2";

}

 

return $value;

}

 

 

How to store the data in $value and separate it for plotting two arrays.

Link to comment
https://forums.phpfreaks.com/topic/128163-array/
Share on other sites

Hi,

 

Based on the value passed from the check box, I have to plot a graph querying the database.

 

Suppose if I check 2 boxes, two values are passed and I have to plot the linegraph for 2 parameters in the single graph i.e the accumulated graph.

 

How to querying Sql statements I know but I have no idea how to store the values and separate it into two different arrays.

 

function getValues($option = 1) {

$value=array();

 

if($option==1){

$value[] = "select bd from table1";

}

 

if($option==2){

 

$value[] = "select bw from table2";

}

 

return $value;

}

 

 

How to store the data in $value and separate it for plotting two arrays.

Link to comment
https://forums.phpfreaks.com/topic/128163-array/#findComment-663795
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.