Return ASCII value of character in php?

April 11, 2010 | Filed Under PHP | Comments Off

using ord() method we can get ASCII value of character in php.

<?php
$str
= "\n" style="color: #007700;">;
if (
ord style="color: #0000bb;">$str) == 10) {
echo
"The first character of \$str is a line feed.\n";
}
?>

Comments

Comments are closed.

© PHPInterviewQuestion.com 2009 - 2012

eXTReMe Tracker