sandesh phuyal sandesh phuyal - 1 year ago 106
HTML Question

Echo colon array in table format

I am not able to convert this array which is defined by colon to display in table (as mentioned below). Can anyone please guide me.


Must look like this table format:

enter image description here

Answer Source
$info_array = explode(",",$info); 
$table = "<table>";

foreach($info_array as $row){
    $row_obj_array = explode(":",$row);
    $table .= "<tr><td>$row_obj_array[0]</td><td>$row_obj_array[1]</td></tr>";

echo $table;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download