Bringing data from MYSQL to two-dimensional array
How would I bring data out of a mysql database table into a two-dimensional array to look like the following?
$nodes = array(array(1,2,120),array(2,1,120),array(2,3,545) ,array(3,2,545));
So that I can use the same array in one function where is manipulated. The database table looks like:
CREATE TABLE `nodes` (
`NodeFrom` int(7) default NULL,
`NodeTo` int(7) default NULL,
`Distance` float default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ssjp
|