Hello all.
Basically what I am doing here is scanning a directory, reading eah file and outputting the file to the browser in an array format.
What I am looking to do is replace a bunch of line breaks with newline characters.
Here is the code I am using, which does not alter the output in any way.
while(($nfile = readdir($NHANDLE)) !== FALSE){
if($nfile !== '.' && $nfile !== '..'){
/** check to see if $nfile starts with complete **/
if(!eregi("^complete(.*)+", $nfile)){
/** file does not start with complete -> continue **/
$lines = file($FILE_DIR.$id_dir.'/'.$nfile);
foreach($lines as $key => $line){
$lines[$key] = htmlentities($line);
$lines[$key] = explode($DELIM, $lines[$key]);
ereg_replace('<br>', '\n', $lines[$key]);
}
}
/** lines broken up into arrays -> $lines[i][] **/
echo '<pre>';
print_r($lines);
echo '</pre>';
}
}/** end while $nfile !== FALSE **/
Here is the text I am working with:
[30] => Bachelor's degree in Mechanical Engineering and ten+ years experience developing sheetmetal and plastic enclosures for high volume electronic equipment or equivalent experience.<br><br>Test x 1: /<br>Test x 1: "<br>Test x 1: <br><br>Test x 3: ///<br>Test x 3: """<br>Test x 3: <br><br>Communicates very well verbally, in writing, and graphically. Makes clear and effective presentations to inform and persuade peers and managers.<br><br>Experience working with Far East suppliers.<br><br>Ability to establish clear goals and formulate plans to achieve them.<br>Good problem-solving skills.<br><br>Ability to work independently and as part of a team.<br><br>Experience with one or more CAD and FEA applications is a plus (e.g. Pro E, Mechanica etc.)<br><br>Experience with consumer product development is a plus.<br>
[31] => ASSOCIATEDEGREE
[32] => Business Environment:<br><br>HP has the world's second largest computer research laboratory. We invent new technologies and innovative information products. Change markets. Create business opportunities.<br><br>We also help to plan and broaden company strategy, and deliver the science and technology that achieves it. And that gives HP leadership.<br><br>We're focused on e-services, technologies and solutions. On internet and computing platforms, printing and imaging technologies, storage and intelligent information appliances, and we're chasing down broader alternative technologies and basic research.<br><br>On manufacturing sites we turn foundation technology from HP labs into real solutions. We're getting smarter. Acting sharper. Moving faster. Getting people off the bench and into customer sites to speed up time to market. Heading for zero-time technology transfer<br><br>At HP, we in R&D don't just dream about the future. We invent it.<br>
[33] => Full Benefits
Any help would be much appreciated.
TIA.