Hi,This is my php file.
I want to replace
$$FullName$$ with Jon Rama
And $$FirstName$$ with Jon and $$Gender$$ with Male

And save or create to new file Jon_Rama.php

<table width="100%">
	<tr>
		<td align="center">
		<b>
			<h1 class="title_list">$$FullName$$</h1>
		</b>
		<br><br>
		</td>
 	</tr>
  	<tr>
   		<td>$$FirstName$$ is a $$Gender$$.</td>
	</tr>
</table>

How to do this??

Please anyone remove my duplicate thread on same topic

By mistake i post twice...

Try the following:

$data='<table width="100%">
	<tr>
		<td align="center">
		<b>
			<h1 class="title_list">$$FullName$$</h1>
		</b>
		<br><br>
		</td>
 	</tr>
  	<tr>
   		<td>$$FirstName$$ is a $$Gender$$.</td>
	</tr>
</table>';
$data=str_replace(array('$$FirstName$$','$$Gender$$','$$FullName$$'),array('Bill','Male','Bill Gates'),$data);
echo $data;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.