I'm trying to write a php function that takes the $name and $time and write it to a txt file (no mySQL) and sort the file numerically.

For example:

```
10.2342 bob
11.3848 CandyBoy
11.3859 Minsi
12.2001 dj

```

just added Minsi under a faster time, for example.

If the $name already exists in the file, only rewrite it if the time is faster (smaller) than the previous one, and only write if the time fits within 300 entries to keep the file small.

My forte isn't file writing but I was guessing to go about using the file() to turn the whole file into an array, but to my avail, it didn't work quite like I wanted. Any help would be appreciated