Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-21-2009, 09:36 PM #1
- Join Date
- Mar 2006
- Thanked 0 Times in 0 Posts
mmm how do i describe this? i have a string within a string that does not work.
i have all my variables in a vars.php file and this is included at the top of al my pages.
<?php $emailtextstring = "Thank you $namestring for signing up to xxxxx"; // $namestring does not yet have a value ?>
i wish to use this to email the user welcoming them.
how do i have a string use a variable later on in a script before it is setup?
i have just tried this out and seem to get the string name to show but not the content
<? // yes this line first! $test = "\$name"; // yes this line second! $name = "jason"; echo($test); // output should be... // jason // but it outputs.... // $name ?>
Last edited by jasonc310771; 08-21-2009 at 09:43 PM.
08-21-2009, 09:54 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 Posts
$test = &$name;
$name = 'Jason';
printf("\$test = %s\n", $test);
Last edited by Fou-Lu; 08-21-2009 at 09:56 PM.PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');