What I have not is not scaleable... What I have is a set amount in a database and I echo the information in my php document like this...
database
SCD 0; #ff9900 ; wfbscd13 ; 158.140.161.55 ; 16:54:40 ;
SCD 1; #ff9900 ; wfbscd13 ; 158.140.161.56 ; 16:54:40 ;
SCD 2; #ff9900 ; wfbscd13 ; 158.140.161.57 ; 16:54:40 ;
so my echo looks like this
<div class="scdenvelope" style="display: <?php echo ( trim($rack['SCD 0']) == 'wfbscd13') ? 'yes' : 'none'; ?>;"></div>
with my method now I need to code each line but every time I need to encode each locator specificly [SCD 0], [SCD 1], etc....
How would I change the above line (my echo) so it's based on a new record [SCD ?] so it is scaleable?
here is the var to be complete but it's probably not what we're looking at.
<?php
$scd = array();
if (($handle = fopen($statfile, "r")) !== FALSE)
{
while (($data = fgetcsv($handle, 1000, ";")) !== FALSE)
{
if(substr(trim($data[0]), 0, 3) == 'SCD')
{
$board = trim($data[0]);
$temp = $data[2];
$rack[ $board ] = $temp;
}
}
fclose($handle);
}
?>