iI have this loop where i'mI'm creating a link , but bootstrap modals prevents me to use php varsPHP variables properly from the top loop. (Yes a loop in loop).So i So I decided to use jqueryjQuery and get the id from the button when isit's clicked, and that is fine, butbut how todo I append this into the link without appending the whole link , because there is another ID variable which imI'm using again in this links ? Here in $value->getId() i$value->getId() I need to append value from JqueryjQuery.
foreach ($exploredArtistBands as $band) { echo '<a href="/notification/invite/' . $value->getId() . '/' . $band['band_id'] . '">Join to ' . $band['name'] . '</a><br />'; } $('.invite').click(function(){ $(this).attr('button-id') }); $('.invite').click(function(){ $(this).attr('button-id') });