Hi,
My script is a bit complicated so I will try to use an example that has the concept of what I'm trying to do.
I have a hash that will be containing duplicate keys but different values.
What I need to do is to print the following format in HTML so it works properly with my DHTML Ticker. For the DHTML Ticker to work the format goes as:
<div id="tick1" class="dropcontent" subject="8-15-2006">
Jerry
John
Jen
</div>
<div id="tick2" class="dropcontent" subject="8-16-2006">
Keith
Ken
Kendra
</div>
So I have a hash that stores a date value as its key and its value as the winners that day.
So if Jerry, John, and Jen won on 8-15-2006 then the hash will be like this:
%events=("8-15-2006"=>"Jerry","8-15-2006"=>"John","8-15-2006"=>"Jen");
But on a typical day, we would like the "ticker" to display each day of the week. So the hash will multiple days with multiple winners, not just "8-15-2006"
I have enough to populate the hash, but I don't know where to go to print out the HTML Format I need. As you notice, each div block has its subject as the "8-15-2006". Since 8-15-2006 shows up three times in the %events hash, then I need a way where it will only print it once but at the same time also print all 3 values for each winners name. Notice also how also the div id name changes from tick 1, tick 2 etc. Right now I just don't know enough to start accomplish.
Any help or referrences here would be awesome...thanks for taking your time to read this.
Bobby
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.