MySQL Forums
Forum List  »  PHP

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


Options: ReplyQuote

Written By
storing multidimensional array in mysql table
July 18, 2005 08:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.