H
Hamish Symington
Hello,
I'm trying to re-code a site which I wrote in PHP into
ASP.NET using Visual Basic .NET.
Something PHP has which has proved invaluable is the
concept of variable variables. I haven't had any success
with working out how to do it and hoped someone might be
able to help.
What I need to do is (for example)
Dim Foods(2) As String
Foods(0) = "Fish"
Foods(1) = "Chips"
Foods(2) = "Peas"
For Foods = 0 To 2
Dim [value of Foods(x)] As String
Next
So this would declare three variables as strings: called
Fish, Chips and Peas.
I've found info on Eval and Execute in various places but
they appear not to work for ASP.NET.
Can anyone help? Apologies if this is the wrong group -
do let me know if so.
Thanks, Hamish
I'm trying to re-code a site which I wrote in PHP into
ASP.NET using Visual Basic .NET.
Something PHP has which has proved invaluable is the
concept of variable variables. I haven't had any success
with working out how to do it and hoped someone might be
able to help.
What I need to do is (for example)
Dim Foods(2) As String
Foods(0) = "Fish"
Foods(1) = "Chips"
Foods(2) = "Peas"
For Foods = 0 To 2
Dim [value of Foods(x)] As String
Next
So this would declare three variables as strings: called
Fish, Chips and Peas.
I've found info on Eval and Execute in various places but
they appear not to work for ASP.NET.
Can anyone help? Apologies if this is the wrong group -
do let me know if so.
Thanks, Hamish
