Jump to content

Search the Community

Showing results for tags 'multiple array'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I have a repeating loop which displays tracks from an album with a link on each track pointing to lyrics which appear in a popup window. Well, that's what I want to do at least Here's the code which displays the track listings: <?php // Show Album Tracks $albumTracks = $page->children; foreach ($albumTracks as $track) { $html = "<tr>"; $html .= "<td>"; $html .= "<a href='" . $track->song_file->url . "' class=''>" . $track->title . "</a>"; $html .= "</td>"; $html .= "<td>"; if ($track->lyrics != null) { // LYRICS LINK $html .= "<a href='#' data-reveal-id='lyricPopup'>Lyrics</a>"; }; $html .= "</td>"; $html .= "<td>"; $html .= "<a href='#'>Buy</a>"; $html .= "</td>"; $html .= "</tr>"; echo $html; } ?> The link is pointing to a modal popup div below: <div id="lyricPopup" class="reveal-modal" data-reveal> <h2><?php echo $track->title; ?></h2> <?php ?> <a class="close-reveal-modal">×</a> </div> What I need to do is have each track's lyrics popup in the modal. Can anyone supply the code for setting up the multi-dimension array which keeps tracks of which song title (lyric link) was clicked so that the appropriate lyrics for that particular song (associated with that song) appear in the modal? I understand the concept of arrays, but multidimensional are out my league. Knowing which link was clicked and retrieving the associated content for it is also beyond me. Not sure where to start. Thanks!!!
×
×
  • Create New...