Bret thanks again for helping me out. I tried that but Im not sure thats what I need. Or maybe I just dont quite understand it.
Assume I already pulled this variable $YYY_01_XXX from the db its value lets asume is 'ABCDEFG' so
$YYY_01_XXX = 'ABCDEFG';
basically I want to be able to end up with another variable that will hold the name of the variable pulled from the db. This variable will change in the for loop like you displayed.
$variable = "$YYY_01_XXX"
when in lopp will look like this
$variable = "$YYY_02_XXX"
$variable = "$YYY_03_XXX"
$variable = "$YYY_04_XXX"
...
on a side note i am trying this like so $variable = '$YYY'".$number."'XXX';
and
echoing $variable should give me the value that was pulled from the db.
Whats happening is $YYY_01_XXX is getting interpreted as a string instead of a php variable. and just displaying exactly that $YYY_01_XXX instead of ABCDEFG.
That last post might be correct I may have just misinterpreted it.