Jump to content

[SOLVED] include() in classes


scrubbicus

Recommended Posts

I've got a calendar that I've been messing around with that's built inside a class. What I originally wanted and made was an HTML calendar with javascript over the numbers so that when someone hovers over it they get a tooltip of what's going on that day, each of the locations in the javascript code is a php include() so that I can edit the individual tooltips externally. I decided I've been trying to get better at PHP so why not try out a calendar. So I have that calendar and I want that same thing to happen, the javascript works just fine, each number after iterated throughout the calendar gives me a tooltip but I can't seem to tweak it enough to get that tooltip to be a phpinclude() file.

 

Here's my a snippet of the calendar, this example is for Day 1

 

if($day == 1)

{

    $link = "<a href=\"#\" onMouseover=\"ddrivetip('TOOLTIP INFO HERE','#b687db', 150)\";

    onMouseout=\"hideddrivetip()\">";

}

 

I've tried so many different things, I've tried creating a function in that class that I can call from outside with the include file() so that the information is outside the class but gets called into it with the information from the include file already. I've tried creating variables inside the class and putting them in this function. Static variables. Variables from outside the class. If I can get any help it be appreciated.

 

Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/147370-solved-include-in-classes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.