On Tue, 14 May 2002, Jack wrote: > I had a problem with fread function! > I had a text file containning a date, so inside the text file, it was > something look like this : 05032002 > then now i want to read this file but want to seperate the dd -mm-yyyy, so i > want to get the first two digit as the (day), then nex two as the (month) > and last four as (year) to display in my "INPUT BOX". > > How i can read a file by telling it how much digit i want?
Just read the whole date and use functions like substr() to break it apart afterwards. Much easiest and faster than trying to read little bits at a time from the file. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php