Hello! I've done some Googling about this, and many sites say that "hasing" is a better alternative than using a variable name with a variable name.
I don't understand the concept of hashing, and what I'm trying to do seems small and insignifant, so I was hoping someone could help me.
I'm using a regular expression to split up my input into groups.
I want to assign each group ($1, $2, $3, and $4) to $oct1, $oct2, $oct3 and $oct4.
An array won't work due to what I'll be doing later on.
This is the for loop I thought would work. Later on, if I try to call $oct1, I can't. However, if I call $oct{1}, I can. So the code below must not be doing what I hoped it did.
for ($x = 1; $x < 5; $x++)
{ $oct{$x} = ${$x};
}
I appreciate any help.