You are here: Re: Array problem (MySQL/PHP) « All PHP « IT news, forums, messages
Re: Array problem (MySQL/PHP)

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация