yah, i down sized file like 10x smaller, and it worked....
making sentances into words...
Collapse
X
-
hey ProG, anyway you can make me another simple script? to check for any empty lines and lines that start with 0-9 or some weird symbols (such as -,---,===,%---, etc, etc) and remove those lines ?
basically to remove any empty lines and lines that start with anything other then a valid character (a-z or A-Z)
Last edited by qwe; 05-03-2009, 10:52 PM.Comment
-
hey ProG, anyway you can make me another simple script? to check for any empty lines and lines that start with 0-9 or some weird symbols (such as -,---,===,%---, etc, etc) and remove those lines ?
basically to remove any empty lines and lines that start with anything other then a valid character (a-z or A-Z)
if I understand what you are asking for, this will do it nicely:
Code:<?php if ( ( $file = file( "file.txt" ) ) !== false ) { foreach( $file as $line ) { if (ctype_alpha($line{0})) { echo $line . "<br>"; } } } ?>
__________________
Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
Check out the #1 WordPress SEO Plugin: CyberSEO SuiteComment
-
also note that I used <br> for html output instead of \n so if you need it for your text file use then you should change that part
__________________
Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
Check out the #1 WordPress SEO Plugin: CyberSEO SuiteComment
-
-
__________________
Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
Check out the #1 WordPress SEO Plugin: CyberSEO SuiteComment
-
Sentances?
Might wanna incorporate a spell checker into this thing too..
Sorry.. had to be said..
Comment


Comment