PHP ord() Function | Tutorial
\n\nPHP ord() Function
\nThe ord()</ function in PHP returns the ASCII value of the first character of a string.
Syntax:
\n<?php
ord(string $string): int;
?>\n Example:
\n<?php
$str = "Hello";
$asciiValue = ord($str);
echo $asciiValue; // Outputs: 72
?>\n This function is useful for working with ASCII values and can be used in various applications such as encryption, decoding, and more.
\n\n```
YouTip