replace text with images

i been working on a script that displays data from an on the fly created text file

i was wondering if there is a way to replace text from one of the fields with images



<title>New Page 1</title>

<body link="#C4AE7B" vlink="#C4AE7B" alink="#C4AE7B" bgcolor="#000000" text="#C4AE7B">
<table border="1" width="300" bordercolorlight="#C4AE7B" bordercolordark="#C4AE7B" cellspacing="1" bgcolor="#000000">
		<td width="70" align="center">Users</td>
		<td width="70" align="center">Type</td>
<table border="0" width="300"  height="30">



$readfile = file("../voos/rooms.txt");

for ($k=0; $k<=count($readfile)-1; $k++) {
    $fields = split("t",$readfile[$k]);

echo "<table width="300" border="1" bordercolorlight="#C4AE7B"bordercolordark="#C4AE7B"cellspacing="1" cellpadding="1"><tr>  
	<td ><a href="$url" target="_none">$roomname</a></td>  
	 <td width="70" align="center">$count</td>
	<td width="70" align="center">$type</td></tr>";

i have an image for each result but im not sure how to swap them ?

If you have the path of the image in your variables, you can simply do something like:

echo "<img src='".$myImageName."'>";

the path is not in the varible what im trying to do is the varible will be one of 6 names depending on the name id like it to display a corosponding image

Sponsor our Newsletter | Privacy Policy | Terms of Service