How would i get <%= "@obj#{count}" %> to actually display the variable value in the DOM instead of @obj0, @obj1, etc
I’ve got variable @obj0, @obj1, @obj2, etc that I need to display
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A couple of ways.
First, the most correct (IMHO) is to put all your vars to an array and index that.
Another option is to use
eval. Avoid this (unless you really know what you’re doing).