In some cases, when working with a web server, overriding the web server's default content type may be required. There may be cases where you need to send data as plain text, JSON, or XML, for example.
The header() function can send a raw HTTP header. You can add the Content-Type header to notify t...