473,811 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

one tiny little problem

this doesnt work: i believe it is $row_QCBD_GHOUR S["$day2"] that is the
problem.

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

//ghours
if (($time > $row_QCBD_GHOUR S["$day1"]) && ($time <
$row_QCBD_GHOUR S["$day2"])){
$openclose= '<font color=green>Ope n</font>';
}else{ $openclose= '<font color=red>Close d</font>';
}

when i change $row_QCBD_GHOUR S["$day2"] to a number it works like its
supposed to, so for some reason $row_QCBD_GHOUR S["$day2"] in that
location is not working. i can print out $row_QCBD_GHOUR S["$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.

Aug 12 '05 #1
3 1060

kiqyou_vf wrote:
this doesnt work: i believe it is $row_QCBD_GHOUR S["$day2"] that is the
problem.

// assign $day var
$day1= date('D')."1";
$day2= date('D')."2";
$open= $row_QCBD_GHOUR S["$day1"];
$close= $row_QCBD_GHOUR S["$day2"];


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

Ken

Aug 12 '05 #2
It still doesn't work. I continue to have problems with
$row_QCBD_GHOUR S[$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_GHOUR S[$day2] (with or without double
quotes) but I can't print out $close. SOoooooo confused.

Aug 12 '05 #3
i dont know, for some reason it just started working. thanks for your
help.

Aug 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1699
by: Sven Kobow | last post by:
Hello, I'm not yet a python programmer but a python user. I faced a problem with tiny fonts in a wxPython app on a GNU/Debian system. Under Gentoo Linux the fonts are displayed in a normal readable size. Only on that Debian system fonts in the whole app are rather tiny. I spend quite a long time googling for a solution and found several hints on font problem issues in wxPython but none fitted to that mentioned above. Does anybody has a...
5
2216
by: Mel | last post by:
i would like to place a tiny image on the top-left corner of all screens and on clicking the image to to http://www.somewhere.com url can you please help ?
7
5894
by: Werner Nussbaumer | last post by:
Hello I am searching for a version of the Tiny C compiler for Windows 32. I downloaded a version from http://fabrice.bellard.free.fr/tcc/ but the make command displayed error messages: P:\DEVELOP\c2\TCC-09~1.20>make MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp. Error makefile 5: Command syntax error Error makefile 13: Command syntax error
2
1411
by: Marco Ippolito | last post by:
Hi, I am giving a seminar on C# interop and I would like to feature an original sample class to stimulate some interest. Does anybody want to write an open-source ConsoleApp || WinApp that, given a starting English word, calls Babylon for translations in N languages and plays a game with the user assigning one point for every language/translation pair entered? (I am a licenced user for 2004 :-)
5
4083
by: soeren | last post by:
Hello, two days ago I stumbled across a very strange problem that came up when we were printing tiny double numbers as strings and trying to read them on another place. This is part of an object serialisation framework that cannot be done in binary format currently, so please no comments about this ,-)) It took quite some time to shrink down the problem but it looks like that C++ does not behave well in regards to very tiny numbers.
2
1654
by: Martijn Mulder | last post by:
I want to implement a tiny window in my application, one that you typically invoke via the menu-option Window -Toolbar. It must be floating, not restricted to the client area of the controlling form. It has a tiny close-button on the right-hand corner. How do I implement this?
0
5578
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
31
4208
by: melinama | last post by:
Hello, I've looked through alt.html and this group for an answer to my question. However, I found only cranky arguments with, occasionally, bits of hard-to-understand code - out of context - each of which is slammed by the next people along in the thread. So I'm afraid to ask this but I need to know!...
14
5625
by: rtk | last post by:
I'm looking for information on building a tiny/small/minimalist/ vanilla python interpreter. One that implements the core language and a few of the key modules but isn't tied to any specific operating system. I guess I'm asking for the smallest subset of the standard Python source code files that is necessary to get a working interpreter using a plain C compiler. Is this even possible? If so, has someone done it already? I've
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.