Hi;
I am not expert in php and trying to make a php script for making
random user names from a list of first names in a text file and write
it to a new text file, I got some simple php code but I am not sure
how to proceed,
I am very grateful if anyone can help here.,
I have a list of first names in a text file, one name per line, the
list has been copied from a excel column,
now I want the script to read the text file and then add random number
and characters ( max of 5) after the name separated by a underscore or
hyphen then print the new made user names into a new text file
organized the same way the first name file is, one user name per line.
e.g of first name text file:
SAM
David
bob
and then the example of new user names becomes similarly like this:
SAM_6yt66
David_23rt
bob-44uyt
here is what I could get so far:
<?php
$textfile = "name.txt";
$file = fopen("$textfile", 'r');
$Data = fread($file, filesize($textfile));
foreach ($lines as $line) {
$line = rtrim($line);
?>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php