Hello,
I have a page called users_online.phtml that list all the users currently logged into my site in a users_online.txt file.
Basically in the file, it lists usernames eg..
username1
username2
username3
username4
I want a php code, that will count the number of users so I can say, there are currently X amount of users currently online!
Make the user online variable called $users_online
I also want to break the file into its own line so I can print this html to create a list.
eg. (create a loop so that it lists all the users)
while($something == $something_else) {
<center>$user[$x]</center>
}
This way when you view source it, it will show this..
<center>username1</center>
<center>username2</center>
<center>username3</center>
<center>username4</center>
Also, if I want to get a certain username or something in the future, I just use $user B being the number of the user that is online so I can do something specific with just that single user.
If you need a better explaination, please reply.