Topic awaiting preservation: It never fails! Urgh! (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted |
posted 05-25-2002 10:33
In PHP when i pull things out of txt file it always like skips are misses something. |
Obsessive-Compulsive (I) Inmate From: Somewhere in Iowa |
posted 05-25-2002 11:07
If you have a blank line at the end of the file it may be checking that. If the value is nul you could always stick the random selection in a loop. |
Neurotic (0) Inmate Newly admitted |
posted 05-25-2002 11:17
Ok that makes sense. How would I add a loop into this? |
Obsessive-Compulsive (I) Inmate From: Somewhere in Iowa |
posted 05-26-2002 01:32
Use WHILE() { } http://www.php.net/manual/en/control-structures.while.php code: <?php
|
Maniac (V) Inmate From: Florida |
posted 05-26-2002 02:46
ok now it seems to be missing more often. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 05-26-2002 02:55
Wierd it looks like $Img[$Pull] is returning true even though it's returning a 'blank' value. |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 05-26-2002 03:35
I'm not sure, but maybe you could test to make sure your not pulling a blank line from the text file. code: <?php
|
Maniac (V) Inmate From: Florida |
posted 05-26-2002 05:14
ShrineMaster rewrote the script and it works beautiful. |