I have the following php array:
Array
(
[0] => Array
(
[name] => page_1
[clicks] => 3
[time] => 14250
)
[1] => Array
(
[name] => page_2
[clicks] => 1
[time] => 123
)
[2] => Array
(
[name] => page_3
)
[3] => Array
(
[name] => page_4
[clicks] => 2
[time] => 1450
)
)
and the following table:
tbl_usage
--------
page_1
page_2
page_3
page_4
What is the best way to add the 'clicks' and 'time' from the array to the proper page column - so the table looks like this:
page_1 page_2 page_3 page_4
-------- ------- --------- ----------
3:14250 1:123 0:0 2:1450