Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 08-19-2003, 07:20 PM   #1 (permalink)
netpants
Registered User
 
Join Date: Aug 2003
Posts: 3
netpants is on a distinguished road
Trying to get number of e-mails in a txt file to appear on my main page

Ok I have a mailing list, in this mailing list are e-mails, and i need a code or script or what not to put on my main page displaying the number of e-mails that are in the txt file. Like the below sample

There are currently 464 members on this mailing list.

The page it will be on is a .php page so i cant use ssi.
http://www.psycoside.com/prototypeBASE.php in the left menu all the way at the bottom is where it will be. Any help will be appreciated.
netpants is offline   Reply With Quote
Old 08-19-2003, 07:56 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
if your email file, lets call it email.txt looked like this: where you have each email address on it's own line, .. then you can use the php script below.
PHP Code:
<?
$array 
file("email.txt");
$count=count($array);

echo 
"There are currently " $count " members on this mailing list.";
?>
__________________
Mike
sde is offline   Reply With Quote
Old 08-19-2003, 08:26 PM   #3 (permalink)
netpants
Registered User
 
Join Date: Aug 2003
Posts: 3
netpants is on a distinguished road
ok so all i do is throw that in my .php page?
netpants is offline   Reply With Quote
Old 08-19-2003, 08:34 PM   #4 (permalink)
netpants
Registered User
 
Join Date: Aug 2003
Posts: 3
netpants is on a distinguished road
thank you sooo much, i posted in other forums, and they had me making new files, trying 10 diffrent scripts, running around in circles, and all i had to do is post that code, you da man and thanks so much
netpants is offline   Reply With Quote
Old 08-19-2003, 08:46 PM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
=) no problem.
__________________
Mike
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
main page CaN Opener Feedback 2 07-09-2003 04:30 PM
dynamic allocation..urgent help needed!!! kashif Standard C, C++ 4 04-21-2003 08:50 AM


All times are GMT -8. The time now is 10:33 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting