Hi,
when trying to collect data from two tables via two DB Multi Record Loaders I get a data array looking like that:
I don't care that much about the way the data look, but - how do I display them via php ?
I don't know how to get the counter into the code...
Trying this
doesn't work... What has to be around the "$count" to get the counter working ?
Thanks for help...
Doris
when trying to collect data from two tables via two DB Multi Record Loaders I get a data array looking like that:
[CC] => Array
(
[0] => Array
(
[cf_id] => 38
[vote] => 0
[U] => Array
(
[0] => Array
(
[id] => 838
)
)
)
[1] => Array
(
[cf_id] => 43
[vote] => 1
[U] => Array
(
[0] => Array
(
[id] => 837
)
)
)
)
I don't care that much about the way the data look, but - how do I display them via php ?
I don't know how to get the counter into the code...
Trying this
<?php
$count = 0;
foreach($form->data['CC'] as $detail )
{
echo 'ID: ' . $detail[.$count .]['U'][0][id];
echo 'Vote: ' . $detail[vote];
echo '<br>';
$count = $count + 1;
}
?>
doesn't work... What has to be around the "$count" to get the counter working ?
Thanks for help...
Doris
Hi Doris,
You don't say what you need to do with the data here?
One solution might be:
Bob
You don't say what you need to do with the data here?
One solution might be:
<?php
foreach ( $form->data['CC'] as $detail )
{
echo "ID: {$detail['U'][0]['id']} Vote: {$detail[vote]}<br>";
}
?>
Bob
This topic is locked and no more replies can be posted.