Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable inside variable?

Status
Not open for further replies.

GoSooJJ

Programmer
Feb 24, 2001
76
US
I have number of item IDs. The format is like
qty_<itemID>
qty_111
qty_112
qty_113
....

When the form is submitted, I then take that qty_<itemID> to get values by looping the items by using ItemID. I have hard time to figure out how to get value of the qty_111. This is more like variable inside variable. I tried this way but didn't work.

<c:if test=&quot;${not empty paramValues.update_id}&quot;>
<c:forEach var=&quot;cartID&quot; items=&quot;${paramValues.update_id}&quot;>
${param.qty_${cartID}}
</c:forEach>
</c:if>

Can I do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top