Skythrust
Member
- Jul 9, 2019
- 133
- 7
Hi there,
Since I am busy to create a new project I was wondering if there are possibilities to show an array vertical like the example below
This is the code which I am using now;
Since I am busy to create a new project I was wondering if there are possibilities to show an array vertical like the example below
Code:
-- Horizontal view --
John Doe, Jane Doe, Jhon Doe
-- Vertical view --
John Doe
Jane Doe
Jhon Doe
This is the code which I am using now;
PHP:
<?php
$i =0;
echo "<table><tr>";
foreach($JsonstringPersons as $record)
{
if ($record['Online'] == 1) { $APBAreadiv = 'TextOn'; $APBCheck = 'checked'; } else { $APBAreadiv = 'TextOff'; $APBCheck = 'unchecked'; }
$i++;
echo "<td><div class=".$APBAreadiv.">"
.' '.$record['Firstname'] .' '. $record['Middlename'] .' '. $record['Lastname'];
echo
'</div>
</td>';
$i++;
if ($i % 5 == 0) { echo '</tr><tr>'; }
}
echo '</table>';
}
?>