bschultz Posted April 26, 2012 Share Posted April 26, 2012 I need to use a variable variable. I need: $row['pos_1'] $row['pos_2'] to use $i for the numbers I have this: if ($row{[pos_.$i]} == 'ad') which is throwing an error Parse error: syntax error, unexpected '[' Any ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted April 26, 2012 Share Posted April 26, 2012 $row['pos_' . $i] is what you're looking for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.