PHP MySQL with $data[3] to insert in database
===

I have this `$data[3]`

then datadase 

    $string = 'mars@email.com,123,12,1|art@hur.com,321,32,2|jon@hur.com,321,32,3';
    
    $i = 1;
    $count = 0;
    foreach(explode('|', $string) as $v){
     $data = explode(',',$v);
     /*		 echo '$email' . $i . ' = '.$data[0]. '<br />' .
     '$score' . $i . ' = '.$data[1].'<br />' .
     '$street' . $i . ' = '.$data[2].'<br />' .
     '$rank' . $i . ' = '.$data[3] . '<br />';
     */		 
    if ( $count > 0 ){
      echo '|';
    }
      echo $rank = $data[3];
      $sql = mysql_query( "UPDATE value SET player".$i."='".$data[0]."', player".$i."='".$data[0]."', player".$i."='".$data[0]."', rank='".$rank."' WHERE id = '1' " ) or die ( mysql_error() );
    
     $count++;
     $i++;
    }

if you notice that the `echo $rank = $data[3];` that echo was 1|2|3

BUT WHEN I INSERT IT TO DATABASE OR UPDATE THE DATABASE the only thing i see on my DB was the value `3`

I DONT SEE anything wrong with my code. if you do please tell me...

