ill try to explain better....
i have a register form, they put in all their info and then php processes it and then uses fopen() and fwrite() it will add their information into a text file (using a text file it would be easier to edit becuase i would need a ); at the end that fwrite() cant edit before that) and then use php to make a new array of $users [$users=array();] and then populate the array with a text document, so i would want it to.
i can populate the array using php by using php
Code:
index.php
----------------------------------------
$users=array();
require_once('users.database.php');
$users=$users[$id]; //for shortcut purposes
########################################
users.database.php
----------------------------------------
$users[1]=array('test@test.com','testAccount','testPassword');
$users[2]=array('test@test2.com','testAccount2','testPassword2);
//end of user arrayed database
if i was to use count($users) or count(count_keys($users)) it would return 3 instead of 2, i am trying to use count() for counting users, but it counts the email address, username, and password for keys instead of the number inside [] in '$users[1]=array(...);'...
so if i used:
Code:
'1'=>array
(
'test@test.com' //email address
'testAccount' //username
)
and using count() or count(count_keys()) it would return 1 instead of 2, but that being in a text file i cant get it to populate the array
hope that helps explain my situation