stuuu
09-16-2002, 10:32 PM
<?
$write_file = strtolower("../../links/$placement.txt");
$write_me = "\n<tr>\n\t<td bgcolor=\"$s_rot_one\" width=\"30%\" align=\"left\"><font face=\"tahoma, verdana, arial, helvetica\" size=\"2\"><a href=\"$url\" target=\"_blank\">$name</a></font></td>\n\t<td bgcolor=\"$s_rot_one\" width=\"70%\" align=\"left\"><font face=\"tahoma, verdana, arial, helvetica\" size=\"2\">$description</font></td>\n</tr>";
$old_txt = file($write_file);
$fp = fopen($write_file, "w");
fputs($fp, $write_me);
for($x=0;$x<count($old_txt);$x++) {
fputs($fp, trim($old_txt[$x])."\r\n");
}
fclose($fp);
?>
As you can see from the code above, I would like PHP NOT to evaluate SOME of the $vars ($s_rot_one) in my input line ($write_me).
This is what I want to see in my text file once the above code has been executed.
<tr>
<td bgcolor="$s_rot_one" width="30%" align="left"><font face="tahoma, verdana, arial, helvetica" size="2"><a href="url" target="_blank">name</a></font></td>
<td bgcolor="$s_rot_one" width="70%" align="left"><font face="tahoma, verdana, arial, helvetica" size="2">description</font></td>
</tr>
(plus the tabs!)
Any ideas PLEASE :)
$write_file = strtolower("../../links/$placement.txt");
$write_me = "\n<tr>\n\t<td bgcolor=\"$s_rot_one\" width=\"30%\" align=\"left\"><font face=\"tahoma, verdana, arial, helvetica\" size=\"2\"><a href=\"$url\" target=\"_blank\">$name</a></font></td>\n\t<td bgcolor=\"$s_rot_one\" width=\"70%\" align=\"left\"><font face=\"tahoma, verdana, arial, helvetica\" size=\"2\">$description</font></td>\n</tr>";
$old_txt = file($write_file);
$fp = fopen($write_file, "w");
fputs($fp, $write_me);
for($x=0;$x<count($old_txt);$x++) {
fputs($fp, trim($old_txt[$x])."\r\n");
}
fclose($fp);
?>
As you can see from the code above, I would like PHP NOT to evaluate SOME of the $vars ($s_rot_one) in my input line ($write_me).
This is what I want to see in my text file once the above code has been executed.
<tr>
<td bgcolor="$s_rot_one" width="30%" align="left"><font face="tahoma, verdana, arial, helvetica" size="2"><a href="url" target="_blank">name</a></font></td>
<td bgcolor="$s_rot_one" width="70%" align="left"><font face="tahoma, verdana, arial, helvetica" size="2">description</font></td>
</tr>
(plus the tabs!)
Any ideas PLEASE :)