Reply to Re: Array problem (MySQL/PHP)

Your name:

Reply:


Posted by BlackSpider on 10/04/06 10:46

".:[ ikciu ]:." <no@mail.com> wrote in message
news:eg021b$a6v$1@news.dialog.net.pl...
> Hmm BlackSpider <BlackSpider@I.Dont.Exist.com> wrote:
>> function TableData($slot)
>> {
>> global $row_Recordset1, $colour_FREE, $colour_TOOK;
>> $var = "'"."$slot"."'";
>
> What ???????
>
> If you will pass string to this function you no need to add ['] !!!
>
I know, I tried that the first time and it didn't work. It's called "Trying
everything"

>
>> if ($row_Recordset1[$var] == "") {
>> return ($colour_FREE.'" class="timeslot"><div
>> align="center">'.$row_Recordset[$var]);
>> }
>> else {
>> return ($colour_TOOK.'" class="timeslot"><div
>> align="center">'.$row_Recordset1[$var]);
>> }
>
> Same here - no sense
>
As above.

> return ((strlen($row_Recordset1[$var]) == 0?$colour_FREE:$colour_TOOK).'"
> class="timeslot"><div> align="center">'.$row_Recordset[$var]);
The data at the end (Currently $row_Recordset1) would be different in the
end, it's like that now so I can see what values are being returned, to try
and figure out where it's going wrong. The answer to that is in my first
post, it won't let me use $var, or $anything when I'm requesting the array
element.

>
> maybe you will tell us what is stored in variables: $row_Recordset1 and
> $slot ???
I did, $Row_Recordset1 is an assoc array containing table data, in this case
a date, adn $slot contains the word "date", which is the name of the row I'm
trying to get. I did say this in my first posting.

>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl
>
> 2be || !2be $this => mysql_query();
>

[Back to original 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

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