Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a var which contains a big amount of text (actually, it's contains HTML code). With in this var, there is a few time the single word "$name".
My Questioin is how do I change the "$name" words in this large amount of text from "$name" to the actual value of the var "$name".
That problem happens only when the var comes from POST and the "$name" var is being set only after it's recive the var.
For Example, When I write something like this:Code: Select all
<?
$html_code=$_POST["html_code"];
$name="Alex";
// "$html_code" contains a large amount of code, and in a few places theres the word "$name".
echo $html_code;
?>I hope I made myself clear.
The reason for this code is because I'm writing a newsletter sending script, and it's sending the same message to alot of diffrent peoples which all has a diffrent names, of course.
Thank you.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]