Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
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 ( "

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread John Nichel
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" );

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
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

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread John Nichel
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

RE: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread jblanchard
[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,

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
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

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread John Nichel
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

RE: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread jblanchard
[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