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

  1. <html>  
  2. <body>  
  3. <?php
  4. $str = “\n” style=”color: #007700;”>;
  5. if (ord style=”color: #0000bb;”>$str) == 10) {
  6. echo “The first character of \$str is a line feed.\n”;
  7. }
  8. ?>
  9.  </body>   
  10. </html>  
eXTReMe Tracker