got it! i had to have my block of code look like this:
if ( $file = file ( $filename ) ) {
foreach ( $file as $line ) {
if ( $line != "" ) {
$line = trim($line);
echo ( $line . "@mdah.state.ms.us" );
echo "\n";
}
}
} else {
echo ( "
Adam Williams wrote:
John Nichel wrote:
Well, you're not telling fgets how much to read for one, and I'd do
this a different way to begin with...
if ( $file = file ( $filename ) ) {
foreach ( $file as $line ) {
if ( $file != "" ) {
echo ( $line . "@mdah.state.ms.us" );
John Nichel wrote:
Well, you're not telling fgets how much to read for one, and I'd do
this a different way to begin with...
if ( $file = file ( $filename ) ) {
foreach ( $file as $line ) {
if ( $file != "" ) {
echo ( $line . "@mdah.state.ms.us" );
}
}
} else
John Nichel wrote:
Adam Williams wrote:
I have a file called userlist. I'm trying to read the file, and then
echo their name and add @mdah.state.ms.us with it. In the file
userlist, it looks like:
userabc
userdef
userxyz
and I have the following code:
But when I run it, I get:
@mdah.s
[snip]
Hi, I just tried that, didn't make a difference, still not getting my
expected output.
> Try echo "$thedata".'@mdah.state.ms.us';
[/snip]
Ooops, my bad, try
echo $thedata .'@mdah.state.ms.us';
And please do not top post.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi, I just tried that, didn't make a difference, still not getting my
expected output.
[EMAIL PROTECTED] wrote:
[snip]
echo "$thedata"."@mdah.state.ms.us";
[/snip]
Try echo "$thedata".'@mdah.state.ms.us';
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Adam Williams wrote:
I have a file called userlist. I'm trying to read the file, and then
echo their name and add @mdah.state.ms.us with it. In the file
userlist, it looks like:
userabc
userdef
userxyz
and I have the following code:
But when I run it, I get:
@mdah.state.ms.ususerabc
@m
[snip]
echo "$thedata"."@mdah.state.ms.us";
[/snip]
Try echo "$thedata".'@mdah.state.ms.us';
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
8 matches
Mail list logo