It's been a while since I worked with PHP, but I'm sure you can just put the variable directly in the braces.
echo $sum[$wk];
If you need the rest of the string that you have entered, change the single-quotes to double-quotes. PHP will resolve a variable that's contained within double-quotes.
echo $sum["PTS1011_$wk"];
Last edited by Fbody; Sep 2nd, 2010 at 7:31 pm.
Reputation Points: 833
Solved Threads: 392
Posting Maven
Offline 2,846 posts
since Oct 2009