Re: Convert Characters
| From: | Justin Patrin | Date: | Mon, 29 Mar 2004 21:36:18 +0000 |
| Subject: | Re: Convert Characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181724@lists.php.net to get a copy of this message | ||
Reuben Sant wrote:
Hi, Is there a way to convert any character to it's HTML &#xxx; equivalent in PHP? For example A is the letter "A" where the number 65 represents it's ASCII code.If that's true for all chars, you could use: $html = '&#'.ord('A').';'; Or you could just do it for a-z and A-Z. -- paperCrane <Justin Patrin>