PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Can a variable hold non-ASCII character (more like binary information).
Let's say I need 0x0F, 0x4A, and 0x12 stored in a variable $var. Can I then do echo $var? I don't care if the information is not viewable on the screen, as long as their are in the php file sent to the client side and can be read by the client application.
Well if you just echo out binary data to a browser, the browser will just display it as is. For the browser to 'use an external application' to view the data then you need to tell it what type of content it is. For example you couldn't just echo out raw pdf data and expect acroread to open up and display it, you'd need to send a header("Content-type: application/pdf"); which tells the browser it's about to receive some pdf data.
</bad explanation>
Ah, I see what you mean. That no concern to me since I'm not using a browser. I'm writing a wireless Java application that's running on mobiles. So the application knows exactly what it is getting as long as the PHP script manages to echo out binary information