User Tools

Site Tools


uphp:functions:ord

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:ord [2017/05/11 09:49]
admin
uphp:functions:ord [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Return the ASCII character number for a character+Return the ASCII code for a <html><b><span style="color:blue">character</b></html>
  
 ====Description==== ====Description====
Line 11: Line 11:
 <span style="color:black">ord ( <span style="color:black">ord (
 <span style="color:green">string <span style="color:green">string
-<span style="color:blue">$char+<span style="color:blue">$character
 <span style="color:black">) <span style="color:black">)
 </html></well> </html></well>
Line 17: Line 17:
 ====Parameter==== ====Parameter====
  
-<html><b><span style="color:blue">$char<span style="color:black"></b></html>:  string containing 1 character+<html><b><span style="color:blue">$character<span style="color:black"></b>:  A <b><span style="color:green">string<span style="color:black"></b> containing 1 character</html>
  
-====Return Value====+====Return Values====
  
-ASCII code number (0-255) of the passed string.  If the string length is greater than 1 it will return 0.+<html><b><span style="color:green">Integer<span style="color:black"></b>:  ASCII code number (0-255) of the passed <b><span style="color:blue">character<span style="color:black"></b>.  If the <b><span style="color:green">string<span style="color:black"></b> length is greater than 1 it will return 0.</html>
  
 ====Example==== ====Example====
Line 29: Line 29:
   $a=chr(65);   $a=chr(65);
   $o=ord($a);   $o=ord($a);
-  print("ASCII Character ".$a." has code ".$o); // result is 'A' which is the ASCII character number 65+  print("Character ".$a." has ASCII code ".$o);
 ?> ?>
 </code> </code>
Line 35: Line 35:
 ====See Also==== ====See Also====
  
-[[chr()]] - Return ASCII character for a number</html>+[[chr()]] - Return the character for an ASCII code
  
-[[charat()]] - Return ASCII code for character in <html><b><span style="color:green">string<span style="color:black"></b></html> at index+[[charat()]] - Return the ASCII code for character in <html><b><span style="color:green">string<span style="color:black"></b></html> at an index
  
uphp/functions/ord.1494496184.txt.gz · Last modified: 2021/09/13 05:56 (external edit)