<?php
$str1 = 'Hello world!';
echo strlen($str1); // Outputs: 12
$name = "Perú"; // With accent mark
echo strlen($name); // Display 5, because "ú" require 2 bytes.
$name = "Peru"; // Without accent mark
echo strlen($name); // Display 4
<?php
$data = "Two Ts and one F.";
foreach (count_chars($data, 1) as $i => $val) {
echo "There were $val instance(s) of "" , chr($i) , "" in the string.
";
}
?>
Code Example |
---|
:: accessing json data in php |
Php :: |
Php :: |
Php :: how to include file in laravel blade |
:: how to get attachments to emails php |
Php :: |
Php :: cambiare pagina php |
Php :: php for next loop step |
Php :: laravel logger |
:: laravel collective form include image |
Php :: php typeof |
:: php array_walk |
:: nl2br() php |
Php :: |
Php :: Termlaravel validation exists array rules |
Php :: pdf watermark dengan laravel |
:: |
:: Access-Control-Allow-Origin php laravel |
Php :: |
Php :: unique key value array php |
:: |
:: |
:: how to write orderby in join query with where clause in codeigniter |
Php :: unset php return array |
:: filter var php function |
Php :: |
:: php stop loading page |
:: get the current datetime in php when button is clicked |
:: wordpress autoload composer |
Php :: php dirpath multiple file extensions |