I have class that is used to construct the HTML table. I used this class extensively on all my project. It's work fine on my machine which run Apache on linux and on my hosting server. Now I have to switch for a while for some reason to my windows machine. I run the PHP under BadBlue webserver and the class start giving trouble.
Basically, my class is just a few function that receive an argument as array. The array contain the HTML attributes that define the table such as border, bgcolor, cellspacing etc. Not all attributes is set when I call the function so there are some array index that have not been defined. This just fine on my linux machine but not under my PHP/BadBlue. It start complaining 'an index is not defined' in all my code.
This is a sample of my code:
$this->table = "<table" ;
if ($a['border']) { $this->table .= " border=\"".$a['border']."\"" ; }
if ($a['cellpadding']) { $this->table .= " cellpadding=\"".$a['cellpadding']."\"" ; }
if ($a['cellspacing']) { $this->table .= " cellspacing=\"".$a['cellspacing']."\"" ; }
if ($a['width']) { $this->table .= " width=\"".$a['width']."\"" ; }
if ($a['height']) { $this->table .= " height=\"".$a['height']."\"" ; }
if ($a['align']) { $this->table .= " align=\"".$a['align']."\"" ; }
if ($a['valign']) { $this->table .= " valign=\"".$a['valign']."\"" ; }
if ($a['bgcolor']) { $this->table .= " bgcolor=\"".$a['bgcolor']."\"" ; }
if ($a['class']) { $this->table .= " class=\"".$a['class']."\"" ; }
$this->table .= ">\n" ;
Any other way to get around this problem ?