I have some software written in VB that saves data to files and I'm writing a script in PHP that parses them for the data.
I have everything working correctly except for when I get to a value saved as a float. ei Field As Single
I've had no problems with As String, As Byte, As Integer, As Long
example of what I have now thats working.
while(!feof($fp))
{
$line = fread($fp, 254);
$string = substr($line, 0, 10);
$byte = ord(substr($line, 27, 1));
$integer = ord(substr($line, 57, 1)) +
(ord(substr($line, 58, 1)) * 256);
$long = number_format(ord(substr($line, 99, 1)) +
(ord(substr($line, 100, 1)) * 256) +
(ord(substr($line, 101, 1)) * 65536) +
(ord(substr($line, 102, 1)) * 16777216));
[I]sql query[/I]
}
Any ideas how to read a float value?
Thanks