Return to Snippet

Revision: 20836
at November 26, 2009 10:19 by AzizLight


Updated Code
function to_ascii($string)
{
	$ascii_string = '';
	foreach (str_split($string) as $char) 
	{ 
		$ascii_string .= '&#' . ord($char) . ';'; 
	}
	return $ascii_string;
}

Revision: 20835
at November 26, 2009 10:16 by AzizLight


Initial Code
function to_ascii($string)
{ 
    foreach (str_split($string) as $char) 
    { 
        $ascii_string .= '&#' . ord($char) . ';'; 
    }
    return $ascii_string;
}

Initial URL

                                

Initial Description

                                

Initial Title
Convert string to ASCII

Initial Tags
php

Initial Language
PHP