My array like this:
$data = array(
array('name' => 'john', 'surname' =>'doe', 'car' => 'ford'),
array('name' => 'john', 'surname' =>'doe', 'position' => 'manager'),
array('name' => 'john', 'surname' =>'doe', 'location' => 'LA'),
array('name' => 'michael', 'surname' =>'smith', 'car' => 'toyota'),
array('name' => 'michael', 'surname' =>'smith', 'position' => 'salesman'),
array('name' => 'michael', 'surname' =>'smith', 'location' => 'TX')
);
How echo this array like this table:
name | surname | car | position | location john | doe | ford | manager | LA michael | smith | toyota | salesman | TX
maybe my database tables can give an idea
persons
id | name | surname
1 | john | doe
2 | michael | smith
properties
id | properties_name
1 | car
2 | position
3 | location
properties_data
id | person_id | properties_id | value
1|1|1|ford
2|1|2|manager
3|1|3|LA
4|2|1|toyota
5|2|2|salesman
6|2|3|TX