<moderators note>
Please remember to write your response BELOW the previous text.
James Keeline <[EMAIL PROTECTED]> wrote:
--- Waqas Habib <[EMAIL PROTECTED]> wrote:
> Hi, I want to convert my (string, integer) data to binary format. And also
> from binary data to integer format and to string also. Is there any data type
> in php to hold binary data.
>
> -Waqas Habib
Please do not send inquiries to multiple mailing lists at once.
What sort of binary format? That could mean just about anything.
I believe that you know that PHP is a loosely-typed language. That means that
if you try to do something like:
print "456abc" + 22;
then it will take the numeric portion of "456abc" (456) and add it to 22.
Hence, the values are converted to strings or numbers based on the kind of
operation requested. In this case addition.
When sending binary data in an email, it is usually converted to a 7-bit format
with something like base64 encoding.
I think we could be more helpful with some specifics.
James
------------------
Thanks. I am giving you my specification with an example.
Suppose i want to send 7-Bytes to a socket. I want to put "1" in first byte,
"0" in second byte, "3" in 3rd byte, and an IP address in remaining bytes. How
can i do it? And also its reverse process.
Hope you understand the problem..
-Waqas