I think I remember something about pack and unpack working with aunti endian, uncle endian and all the little endians. Jason -----Original Message----- From: Robert Trembath [mailto:robert@bacbarcodes.com] Sent: Tuesday, January 28, 2003 9:02 AM To: php-db@lists.php.net; php-windows@lists.php.net Subject: Help with converting data type from Database in PHP Has anyone done 16-bit integer conversion to decimal in PHP or know the formula to convert the data. Below is an example of what oracle gives me and what I need to convert it to. Any help would be greatly appreciated. Thanks, Robert I get this in unsigned 16-bit Integer format: AACBAACBAACDAACIAADEAAEFAAENAAELAAEMAAEMAAEPAAFDAAENAAFGA AFGAAELAAFFAAFMAAFAAAECAAENAAFMAAGBAAFBAADHAADGAAEEAAFCAA GCAAGJAAFMAADLAACMAACKAACLAACPAADIAAEHAAFHAAGGAAGPAAGIAAEL AACPAACKAACIAACIAACJAACKAACJAACKAACJAACLAACLAACOAADGAAEFAAF GAAGHAAHEAAHFAAGBAADKAACLAACKAACKAACKAACKAACJAACKAACLAACK AACJAACJAACKAACJAACJAACIAACJAACKAACKAACJAACKAACJAACKAACLAACL AACLAACKAACLAACMAACNAACPAADHAAEHAAFOAAHCAAHOAAHIAAFBAADBAA CNAACNAACMAACMAACMAACMAACMAACLAACLAACMAACMAACNAACMAACMA ACNAADAAADCAADNAAFBAAGKAAIBAAIMAAHMAAEIAADAAACOAACMAACMAAC LAACKAACJAACKAACJAACJAACJAACIAACIAACIAACIAACHAACIAACHAACHAACHA ACHAACHAACGAACGAACHAACHAACGAACGAACGAACHAACGAACFAACFAACGAAC FAACFAACFAACGAACGAACFAACFAACFAACGAACFAACGAACGAACFAACFAACGAA CHAACHAACHAACHAACKAADFAAEKAAGFAAHEAAGIAADLAACJAACHAACHAACFAA CFAACFAACFAACFAACFAACFAACFAACFAACFAACFAACEAACFAACFAACFAACEAA CFAACFAACGAACEAACFAACFAACFAACGAACFAACEAACFAACFAACGAACFAACEAA CFAACEAACFAACFAACFAACGAACGAACFAACFAACFAACFAACFAACGAACGAACGAA CGAACFAACFAACGAACGAACGAACGAACHAACHAACGAACHAACHAACGAACGAACGA ACFAACFAACFAACGAACFAACGAACGAACGAACFAACFAACGAACHAACGAACGAACGA ACGAACGAACJAADAAADOAAFAAAFLAAFPAAFHAAECAACPAACHAACGAACFAACFAA CFAACFAACEAACFAACEAACEAACEAACFAACFAACFAACFAACEAACFAACEAACDAACE AACGAACKAADCAADLAAEAAADIAACMAACHAACEAACDAACEAACDAACDAACDAACD AACEAACHAACMAADDAADJAADHAACPAACHAACDAACBAACBAACBAACCAACBAACB AACCAACDAACFAACLAADAAADDAACPAACIAACDAACCAACBAACAAACAAABPAABPA ACAAABPAABPAABOAACAAABPAABOAABOAABOAABOAABMAABNAABNAABNAABMA ABNAACAAACCAACEAACEAACDAACAAABNAABLAABMAABMAACAAACBAACBAACAA ABNAABLAABLAABKAABKAABJAABJAABKAABJAABKAABKAABKAABKAABLAABMAAB OAABPAACAAACBAABOAABNAABMAABLAABLAABMAABMAABNAABNAABNAABMAAB LAABKAABKAABJAABIAABIAABIAABIAABHAABIAABIAABHAABIAABHAABHAABHAABHA ABGAABHAABGAABGAABHAABGAABGAABHAABHAABHAABGAABGAABGAABFAABFAABF AABFAABEAABDAABDAABDAABDAABDAABDAABCAABCAABCAABCAABCAABCAABBAA BBAABBAABAAABBAABAAABAAABAAABAAABAAAAPAABAAAAPAAAPAAAOAAAOAAAO AAANAAANAAANAAANAAAMAAAMAAAMAAALAAALAAAKAAAKAAAKAAAKAAAJAAAIAAA This is the same data converted to decimal, which is what I need PHP to do: 0,0,43,44,45,45,45,46,47,48,48,49,50,51,53,55,54,54,54,54,55,55,55,56,56,58, 66,77,89,96,89,75,70,74,84, 92,87,81,79,74,68,66,65,65,66,72,80,86,81,78,86,96,97,92,91,83,73,67,65,63,6 2,62,62,63,64,63,64,70,81, 89,86,76,67,62,59,59,61,60,59,60,63,65,70,74,68,60,59,59,58,57,57,57,57,60,6 1,59,58,58,59,65,68,64,62, 65,74,88,97,94,95,103,90,68,58,58,59,62,71,86,97,87,68,68,75,70,59,54,54,53, 53,52,51,51,52,51,50,50,49, 48,48,47,47,47,47,47,47,47,47,47,47,46,46,46,45,45,45,45,45,46,47,48,48,45,4 4,44,45,46,47,46,45,44,45, 45,45,45,44,44,45,46,49,52,50,47,45,45,45,45,45,45,46,46,50,56,55,48,45,44,4 4,43,44,45,48,52,53,50,48, 47,45,45,44,44,44,45,44,44,45,45,46,47,51,60,73,81,70,52,46,46,46,46,46,46,4 6,46,45,46,47,47,47,48,50, 57,75,105,143,167,157,119,90,78,63,50,45,45,45,44,43,43,44,43,42,42,42,42,42 ,42,43,42,42,42,42,42,42, 42,42,42,42,42,42,42,42,42,41,41,42,43,43,45,46,47,47,47,53,68,99,140,171,16 1,110,62,45,42,41,40,40, 40,39,38,38,38,38,37,36,37,37,37,37,37,37,37,37,37,38,38,36,36,36,36,35,35,3 4,34,34,34,33,33,33,34,34, 34,33,33,33,33,33,32,32,32,32,32,31,31,31,31,30,30,29,28,28,29,28,28,28,28,2 8,27,27,27,27,27,27,26,26, 26,27,27,27,26,26,26,27,27,27,27,27,28,28,28,27,27,27,28,27,27,27,27,28,28,2 7,27,27,27,27,27,27,27,26, 26,26,25,25,25,25,25,25,24,24,25,24,24,24,24,24,24,23,23,23,23,23,23,22,22,2 2,22,22,22,21,21,21,21,20, 20,20,20,20,19,19,19,19,19,18,18,18,17,17,17,17,18,18,18,17,17,16,16,16,15,1 5,15,14,14,13,13,13,12,12, 12,11,11,10,10,10,0, -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php