I'm using PHP to read data from a file and dump it into an array,
then I'mfeeding that array into mySQL
transfer happens fine except that some the numeric values are halfed

currenly I'm simply tweaking the output by going:

(int) $player_data[16] = $player_data[16] * 2 / 10;

the /10 is needed because it also adds a zero to the end (f*cking guy)

this is the script:

for ($i = 1; $i < 34; $i++){
                        $order = fgets($fp, 100);
                        $order_exploded = explode("=", $order);
                        fwrite($this_fp, $order_exploded[1]);
                        echo($order_exploded[1] . "<br>");
                        trim($order_exploded[1]);
                        $player_data[$i] = $order_exploded[1];

the fwrite() part is just a remainder of old testing (acts as write 
confirm)
the data comes in 'field=value' format hence explode and sh*t

THanks in advance.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to