title: "If" doesn´t work - weird string formatting
body: <p>I have weird problem with data handling. I need to pick data from the user form, and handle it (generate xml).
  The data is for example this:</p>
  
  <p>2000;AC;1;60;5;5;Do your setup      - meaning voltage, voltage type, test current, test time, ramp-up time, rampdown time, and user prompt.</p>
  
  <p>I want to decide how to assemble my xml file based on the last value. If it is zero, there will be shorter xml assembly, while when there is text, there will be user prompt assembly of xml taggery.</p>
  
  <p>So I explode the input into array, and check the value by:</p>
  
  <pre><code>If (empty($xplodline[6]) == true) {do this;}
  else {do that;}
  </code></pre>
  
  <p>The problem is, that it always only does "that", and never "this", even when there is 0 in the $xplodline[6] as intended.</p>
  
  <p>So I put echo $xplodline[6]; into {do that;} to see what´s happening.
  The zero is echoed, (and while this action is in the cycle, I get other $xplodline[6]s from the cycle), and I see there is a space between the zero in the $xplodline[6] and next $xplodline[6] iteration. When I look into user form or temporary cleaned file with these values, there is no space between. Where could it come from?</p>
  
  <p>When I put another array divider into the user form to make it ;0; there is no space, and If statement works well. </p>
  
  <p>Here is the original data from the temporary cleaned file:</p>
  
  <pre><code>2000;AC;1;60;5;5;0
  2000;AC;1;60;5;5;Set your cables for X10
  2000;AC;1;60;5;5;Set your cables for X10 
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>Ok, here is the code:</p>
  
  <pre><code>$stringer = fopen($tempfile, "r");
  while(!feof($stringer)){
  $oneline = fgets($stringer) ;
  $xplodline = explode(";",$oneline) ;
  $range01 = "gross" ;
  $rampup = "100" ;
  $rampdown = "100" ;
  $rampupfunction = "false" ;
  $rampdownfunction = "false" ;
  $currentrange = "_1mA" ;
  $assy01 = "1" ;
  if ($xplodline[0] &gt;= 3000) {$range01 = "gross" ;}
  else {$range01 = "klein" ;}
  if (empty($xplodline[4]) == false) {$rampupfunction = "true" ; $rampup = round($xplodline[0] / $xplodline[4]) ;}
  if (empty($xplodline[5]) == false) {$rampdownfunction = "true" ;$rampdown = round($xplodline[0] / $xplodline[5]) ;}
  if ($xplodline[2] &lt; 1) {$currentrange = "_1mA";}
  if ($xplodline[2] &gt;= 1 &amp;&amp; $xplodline[2] &lt; 10) {$currentrange = "_10mA";}
  if ($xplodline[2] &gt;= 10 &amp;&amp; $xplodline[2] &lt; 100) {$currentrange = "_100mA";}
  if (empty($xplodline[6]) == true) {$assy01 = $xmltestbegin.$xplodline[0]."V ".$xplodline[1].$xmltype.$xplodline[1].$xmlrange.$range01.$xmlrampup.$rampupfunction.$xmlrampdown.$rampdownfunction.$xmlcurrentrange.$currentrange.$xmlvoltage.$xplodline[0].$xmlrampupspeed.$rampup.$xmlrampdownspeed.$rampdown.$xmltesttime.$xplodline[3].$xmlcurrent.$xplodline[2].$xmlballast ;}
  else {$assy01 = $xmlpromptbegin.$xplodline[6].$xmlpromptend.$xmltestbegin.$xplodline[0]."V ".$xplodline[1].$xmltype.$xplodline[1].$xmlrange.$range01.$xmlrampup.$rampupfunction.$xmlrampdown.$rampdownfunction.$xmlcurrentrange.$currentrange.$xmlvoltage.$xplodline[0].$xmlrampupspeed.$rampup.$xmlrampdownspeed.$rampdown.$xmltesttime.$xplodline[3].$xmlcurrent.$xplodline[2].$xmlballast ;}
  file_put_contents ( $filename, $assy01, FILE_APPEND );  
  }
  fclose($stringer);
  </code></pre>
  
  <p>My function works ok, every If except the last one, works...</p>