I was made small framework for fast form create in PHP, all work correct when I write code manually but I have problems when I want include code from txt file (I wand give this option for my user who will just write string in txt), check my example for better understand:
$my_test_variable = "How are you?";
$show_this = "|Example 1|Example 2|$my_test_variable|";
$a = explode ("|",$show_this);
echo "First example: $a[1] Second example: $a[2] Variable to show: $a[3]";
// This example output: First example: Example 1 Second example: Example 2 Variable to show: How are you?
Second example:
//test.txt -> |Example 1|Example 2|$my_test_variable|
$show_this = file_get_contents ("test.txt");
$a = explode ("|",$show_this);
echo "First example: $a[1] Second example: $a[2] Variable to show: $a[3]";
// This example output: First example: Example 1 Second example: Example 2 Variable to show: $my_test_variable
// This is problematic because I want that my $my_test_variable show "How are you";
Do you have idea how I can put $variable in txt file and when file_get_contents threat this like variable not just a string?