storing multidimensional array in mysql table
Posted by:
tdmf
Date: July 18, 2005 08:59AM
Hello everyone,
im wondering how to best store all levels of a multidimensional php-array in a mysql-table.
I cant find proper table layout for an array of the following form:
$object = array(
xpos => array(W1,W2,W3,W4,W5),
ypos => array(H1,H2,H3,H4,H5),
zpos => (D1,D2,D3,D4,D5)
);
This array refers to an object in 3d-space with different x,y and z positions in the sub arrays.
$object[$xpos][0], $object[$ypos][0], $object[$zpos][0] would therefore represent a position in 3d-space.
besides from MY example - im looking for a way to make this position-data as acessible as possible from a mysql table., but just cant find a proper table-design.
thanks for hint and tips
tdmf