I have a foreach loop where I am parsing a json return. Parsing works and I am able to echo what I need. Each return is displayed in a table cell.
I want to have a right click menu in each table cell with a hyperlink where the return will also appear. I have tried a few right click examples and no matter where I put the right click menu, I always see the last item in the loop appear in the hyper link.
My hyperlink is
<a href = "test.com?cmd=<?php echo $json_item;?>ITEM_1</a>
While the table cells all display $json_item properly, the right menu item ITEM_1 is displaying the last value of $json_item