No mater I get pahontom carriage returns in my ch2.php
Does the spilt function or the SQL create this problem ?
$filename = "ch2.php";
$fp = fopen($filename, "w+") or
die("could not open");
rewind($fp);
$title="Frankenstein";
$result = mysql_query("select * from $title where itemnum = $chapter ");
$row2 = mysql_fetch_array($result);
$new = $row2["ebook"];
$new = split( " ", $new );
$wcount= count($new);
include("stringParse.php");
$new = explode( "]", $new );
$count= count($new);
for( $i=0; $i<$count; $i++)
{
$word = ltrim($new[$i]);
$w_len=strlen($word);
$i_len=strlen($i);
fwrite($fp,"lines[",6 );
fwrite($fp, $i , $i_len );
fwrite($fp, "]=" , 2 );
fwrite($fp, "\"" , 1 );
fwrite($fp, $word, $w_len);
fwrite($fp, "\"" , 1 );
fwrite($fp, ";" , 1 );
fwrite($fp, "\n" , 1 );
}
fclose($fp);
$tempcount=$count;
mysql_free_result($result);