|
Posted by Vince Morgan on 10/05/06 04:51
I can't believe I've done it again!
My very very bad.
I'll try again.
If '$slotuser' is empty following assignment from '$row_Recordset1' via key
'$slot' you append an empty string to the return string.
There is no need for the append as it will only be called if there is
nothing to actualy append.
However, if '$slotuser' is not empty you then return a string with that
value appended in the else block
The else block will not be entered if '$slotuser' is an empty string so the
question becomes, "How did it get into this block in the first place?"
It didn't pass the empty string test.
Very curious :)
My sincere applogies for repeatedly misreading your code BlackSpider.
> "BlackSpider" <BlackSpider@I.Dont.Exist.com> wrote in message
> news:v5ednayzlo_lYr_YRVnytQ@eclipse.net.uk...
> > <--PHP
> > function TableData($slot)
> > {
> > global $row_Recordset1, $colour_FREE, $colour_TOOK;
> >
> > $slotuser = $row_Recordset1[$slot];
> > if ($slotuser == "") {
> > return ($colour_FREE.'" class="timeslot"><div
> > align="center">'.$slotuser );
> > }
> > else {
> > return ($colour_TOOK . '" class="timeslot"><div align="center">'
..
> > $row_Recordset1[ $slot ]);
> > }
> >
> > }
> > PHP-->
> >
Vince Morgan
Navigation:
[Reply to this message]
|