[PHP] writing to files From: Adam Jackson (adam81 <email protected>)
Date: 10/13/01

Hello,

I am fairly new to php, but would like to write my outputs to a file here is
what I have so far..... but it writes things like "else" and "if" to the
filename as well.

<?
$file = samplefile;
$fd = fopen($file, "w");
fwrite($fd, " \n
#<?=$site_user?> - <?=$mailbox_id?> - <?=$mailbox_name?><br>
<?=$mailbox_main_email?>> <?=$mailbox_id?><br>
<?
    if($alias1 == NULL)
  {
 print("#");
 }
else
  {
?>
<?=$mailbox_alias1?>@<?=$web_address?> <?=$mailbox_id?>
<?
        }
?

and this displays text like

# blah.com - blah-mail - blahmail.com
blah <email protected> blah-mail

etc etc

any help would be greatly appreciated.

-Adam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>