HELLO FRIENDS !
i just need to know what exactly are the functions of trim()
I know that it strips white spaces from the string …but i came across a script where the trim function was used after fgetss() .
here is the script and i am highlighting the line in RED which i was unclear about.
<?php // set file to read $filename = "data.html"; // open file $fh = fopen ($filename, "r") or die("Could not open file"); // read file while (!feof($fh)) { // strip out tags $data = fgetss($fh, 999); // if nothing present after stripping tags, move on // else print the cleaned line if (trim($data) != "") { echo trim($data) . "\r\n"; } } // close file fclose ($fh); echo "-- ALL DONE --"; ?>And also you might have noticed the 999 passed as second argument to [size=10pt]fegtss()[/size]. that too unclear to me !!