PHP: "non well formed numeric value encountered"
<pre><code>&lt;?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;
}
?&gt;
</code></pre>

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

<p><hr /></p>

<p>Hi, </p>

<p>I'm getting the error above. Line 28 is: $faum = money_format('%(#1n',$aum)."\n";<br />
I have three questions:</p>

<ol>
<li>Why am I getting this error notice and what should I do to fix it?</li>
<li>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: <strong>KEY DATA</strong>,DATA,,,<strong>$aum DATA</strong>,,,,,,DATA,,etc. As you can see, I am deriving $aum by using the <em>file()</em> function. I then count the number of characters from the right of the beginning of each row to get the <em>fixed</em> 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.</li>
</ol>

<p>I appreciate any tips/advice that you might share.</p>

<p>thx, </p>
