Hi, Help please:
I'm new to PHP, and I've been struggling with this 'simple' problem:
This is a simple example of my problem:
The variable name: $data_01 / needs to be made up dynamically.
The variable: $file_name / needs to return the value of variable: $data_01
...but instead, it returns the constructed variable name: $data_01
I've tried many permutations, using variables & arrays, and I cant get it to work, so what am I missing?
$data_01 = "I need to RETURN this text";
$file_name_prefix = '$data_';
$file_name_suffix = "01";
$file_name = "$file_name_prefix$file_name_suffix";
echo ("Result 1: $file_name_prefix$file_name_suffix");
echo ("<br>");
echo ("Result 2: $file_name");
Many thanks