Ok, so i want to send an email from a file, and in this email, i want to send variables.
What command would i use.
For example,
//file1.php
$a = "dominic";
$b = include("file2.php");
//do all the stuff to send an email, sorted!
This is file one, the one that will actually send the email
//file2.php
hello, i can see you name is $a that is a nice name
this is file 2, the email that i wish to be sent with the variable.
my question is, how would i get it so that $b would now echo as "hello, i can see your name is dominic that is a nice name" rather than "hello, i can see you name is $a that is a nice name"
I'm not sure if im using the right command (include) so i also tried using fopen fread etc. but it still echoes $a instead of dominic.
I thought about splitting the email up, and not reading from a file, for example
$part1 = "hello, i can see your name is";
$part2 = "that is a nice name";
$a = "dominic";
$msg = $part1 + $a + $part2;
But i want to include about 10 variables in the email, and it is quiet lengthy so it would result in upto 30 variables needed.
any suggestions?
Thanks
Dom