I would like to know how to remove comment tags from TXT files with PHP , could anyone help me?
I'm having this problem reading txt files that are displaying the comments.
PHP code:
function extrairDadosNotificacao($NomeArquivo){
$arquivo = fopen($NomeArquivo, 'r');
$dados = array();
while (($buffer = fgets($arquivo, 4096)) !== false) {
$dados[] = $buffer;
}
return $dados;
}
$test = extrairDadosNotificacao("test.txt");
echo "<pre>";
var_dump($test);
File txt:
//TEST
//TEST
'test' 1 1 1 1 1 1 1