PHP: «встречается неправильно сформированное числовое значение»

<?php  
function aum($x) {
$contents = $_FILES['userfile']['tmp_name'];
$contents = file("$contents");
$aum = $contents[$x][13].$contents[$x][14].$contents[$x][15].$contents[$x][16].$contents[$x][17].$contents[$x][18].$contents[$x][19].$contents[$x][20].$contents[$x][21].$contents[$x][22].$contents[$x][23];
$faum = money_format('%(#1n',$aum)."\n";    
return $faum;
}
?>

Notice: A non well formed numeric value encountered in ./includes.php on line 28

Привет,

Я получаю сообщение об ошибке выше. Строка 28: $ faum = money_format ('% (# 1n', $ aum). & Quot; \ n & quot ;;
У меня три вопроса:

Why am I getting this error notice and what should I do to fix it? Is there a better way to upload a CSV text file that has non-uniform comma separation into a HTML table? By "non-uniform" comma separation I mean: KEY DATA,DATA,,,$aum DATA,,,,,,DATA,,etc. As you can see, I am deriving $aum by using the file() function. I then count the number of characters from the right of the beginning of each row to get the fixed character number that corresponds with the $aum DATA. The $x variable corresponds to the row numbers in the file. Then I can return each $aum per row $x. I am new to PHP and would like to know if there is a smarter way to do this.

Я ценю любые советы / советы, которые вы могли бы поделиться.

Спасибо,

Ответы на вопрос(3)

Ваш ответ на вопрос