YouTip LogoYouTip

Func String Ord

```html\n\n \n \n PHP ord() Function | Tutorial\n \n\n \n\n \n\n \n\n

PHP ord() Function | Tutorial

\n\n

PHP ord() Function

\n

The ord()</ function in PHP returns the ASCII value of the first character of a string.

\n

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```
← Func String Parse StrFunc String Number Format β†’