Every time I update my form textarea the form addes a white space. This is a probleem because I use the textarea input to create a new array element with every new line that the user uses.
HTML:
<textarea class='form-control input-lg' name='stout' style='width:100%;min-height:200px;resize: none; '>
<?php $a = $functie- >_getFileContent('../content/stout.txt', 'j');
echo $bewerking->_extraInfoInput($a);?>
</textarea>
Functions:
public function _extraInfoInput($a){
$a = preg_replace('/ /', '', $a);
return $a;
}
public function _getFileContent($file,$uitzondering){
$content = file_get_contents($file);
if($content != ''){
if($uitzondering == ''){
$a = $content.'<br/>';
}
else{
$a = $content;
}
return $a;
}
}