Re: [PHP] fwrite int or float

2003-07-24 Thread Curt Zirzow
* Thus wrote Ted Huntington ([EMAIL PROTECTED]): > I basically solved this problem of writing a 32 bit float in little endian on > a big endian computer using: > $num2=pack("f",$num); > fwrite($fp,$num2[3],1); > fwrite($fp,$num2[2],1); > fwrite($fp,$num2[1],1); > fwrite($fp,$num2[0],1); > > for fl

Re: [PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
I basically solved this problem of writing a 32 bit float in little endian on a big endian computer using: $num2=pack("f",$num); fwrite($fp,$num2[3],1); fwrite($fp,$num2[2],1); fwrite($fp,$num2[1],1); fwrite($fp,$num2[0],1); for floating point (I am working on a UNIX [big endian] making a file for

Re: [PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
I should have type "signed 32 bit little endian" and little endian float. Ted Huntington wrote: > ok I see to use the "pack" command, but now how do I format to 32 bit > little endian? > > Ted Huntington wrote: > > > Is there some easy way to fwrite a 32 bit int or float? > > > > -- > > Ted Hunti

Re: [PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
ok I see to use the "pack" command, but now how do I format to 32 bit little endian? Ted Huntington wrote: > Is there some easy way to fwrite a 32 bit int or float? > > -- > Ted Huntington > Programmer Analyst I > Main Library > University of California, Irvine > PO Box 19557 > Irvine, CA 92623-

[PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
Is there some easy way to fwrite a 32 bit int or float? -- Ted Huntington Programmer Analyst I Main Library University of California, Irvine PO Box 19557 Irvine, CA 92623-9557 Phone Bus Off 949 824 8926 Phone MRC 949 824 1674 emesg: [EMAIL PROTECTED] webpage: http://business.lib.uci.edu/webp