
- PHP Tutorial
- PHP - Home
- PHP - Introduction
- PHP - Environment Setup
- PHP - Syntax Overview
- PHP - Variable Types
- PHP - Constants
- PHP - Operator Types
- PHP - Decision Making
- PHP - Loop Types
- PHP - Arrays
- PHP - Strings
- PHP - Web Concepts
- PHP - GET & POST
- PHP - File Inclusion
- PHP - Files & I/O
- PHP - Functions
- PHP - Cookies
- PHP - Sessions
- PHP - Sending Emails
- PHP - File Uploading
- PHP - Coding Standard
- Advanced PHP
- PHP - Predefined Variables
- PHP - Regular Expression
- PHP - Error Handling
- PHP - Bugs Debugging
- PHP - Date & Time
- PHP & MySQL
- PHP & AJAX
- PHP & XML
- PHP - Object Oriented
- PHP - For C Developers
- PHP - For PERL Developers
- PHP Form Examples
- PHP - Form Introduction
- PHP - Validation Example
- PHP - Complete Form
- PHP login Examples
- PHP - Login Example
- PHP - Facebook Login
- PHP - Paypal Integration
- PHP - MySQL Login
- PHP AJAX Examples
- PHP - AJAX Search
- PHP - AJAX XML Parser
- PHP - AJAX Auto Complete Search
- PHP - AJAX RSS Feed Example
- PHP XML Example
- PHP - XML Introduction
- PHP - Simple XML
- PHP - Simple XML GET
- PHP - SAX Parser Example
- PHP - DOM Parser Example
- PHP Frame Works
- PHP - Frame Works
- PHP - Core PHP vs Frame Works
- PHP Design Patterns
- PHP - Design Patterns
- PHP Function Reference
- PHP - Built-In Functions
- PHP Useful Resources
- PHP - Questions & Answers
- PHP - Useful Resources
- PHP - Discussion
PHP - imap_8bit() Function
PHP−IMAP functions helps you to access email accounts, IMAP stands for Internet Mail Access Protocol using these functions you can also work with NNTP, POP3 protocols and local mailbox access methods.
The imap_8bit() function accepts a string value representing an 8-bit string as a parameter and converts it into a printable string, warps it in quotations and returns the result.
imap_binary() function notranslate"> imap_8bit($str);Parameters
Sr.No | Parameter & Description |
---|---|
1 |
str (Mandatory) This is a string value representing the 8bit string to convert. |
Return Values
This function returns a string value which is a quoted-printable format of the given string.
PHP Version
This function was first introduced in PHP Version 4 and works in all the later versions.
Example
Following is an example of imap_8bit() function −
<html> <body> <?php $str = "áéíóú"; $result = imap_8bit($str); print($result); ?> </body> </html>
Output
This generate the following output −
=C3=A1=C3=A9=C3=AD=C3=B3=C3=BA
Example
Following is another example of the above function −
<html> <body> <?php $str = "Alemán ąćęłńóśźż ĄĆĘŁŃÓŚŹŻ"; $result = imap_8bit($str); print($result); ?> </body> </html>
Output
This generate the following output −
Alem=C3=A1n =C4=85=C4=87=C4=99=C5=82=C5=84=C3=B3=C5=9B=C5=BA=C5=BC =C4=84= =C4=86=C4=98=C5=81=C5=83=C3=93=C5=9A=C5=B9=C5=BB