Your example is showing two different things, a variable holding a string and producing filenames, so, you need a better example for us to really know what you are trying to accomplish.
If you do have variables named $data_01, $data_02, ..., stop and change the design to use an array. For accessing a particular string among several defined choices, the variable needs to be an array, with the array index being the 1,2,3,... You would access the array using -
$data[1] = 'I need to RETURN this text';
$data[2] = 'Some other text';
$index = 1; // get/set an index for the array element you want to access
echo $data[$index];
If you are instead trying to reference a filename composed of a prefix and numerical suffix, the value (not the variable name) you are tying to produce would be made up of those two things concatenated together and if the prefix is in a variable already, just use that variable, don't make up more variables.