I am new to php & I don't know if this can be done, but since I already wrote the rest of the code, I am really hoping it can be. I have a php page that dynamically generates several tables/widgets. They are all the same widget, only difference is the id & the data. After the page has loaded, I want to do some data collection on only the clicked table. Regardless of what widget I modify or click, '$this' is always referencing the first widget. Is there a way to set '$this' in php to reference whichever instance of the widget is clicked? (I can't use DOMDocument because I have no html pae to load. It is all generated by php) Thank you!