one tiny little problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
this doesnt work: i believe it is $row_QCBD_GHOURS["$day2"] that is the

// assign $day var
$day1= date('D')."1";
$day2= date('D')."2";
$open= $row_QCBD_GHOURS["$day1"];
$close= $row_QCBD_GHOURS["$day2"];
$hour= date('h') + 2;
$minute= date(i);
$time= $hour . ".$minute";

if (($time > $row_QCBD_GHOURS["$day1"]) && ($time <
    $openclose= '<font color=green>Open</font>';
    }else{ $openclose= '<font color=red>Closed</font>';

when i change $row_QCBD_GHOURS["$day2"] to a number it works like its
supposed to, so for some reason $row_QCBD_GHOURS["$day2"] in that
location is not working. i can print out $row_QCBD_GHOURS["$day2"] in
other places and it works, just not in that location. so i dont know, i
have no idea. if anyone can help me thatd be great. thanks a lot.

Re: one tiny little problem

kiqyou_vf wrote:
Quoted text here. Click to load it

Remove the quotes from around $day1 and $day2. You want the value of
the variables to be your index, not the strings.


Re: one tiny little problem

It still doesn't work. I continue to have problems with
$row_QCBD_GHOURS[$day2] with or without double quotes, when I replace
it with the number that it should be returning everything works as it
should. I can print out $row_QCBD_GHOURS[$day2] (with or without double
quotes) but I can't print out $close. SOoooooo confused.

Re: one tiny little problem

i dont know, for some reason it just started working. thanks for your

Site Timeline