Answers for "str count php"

PHP
11

how to check php string length

<?php
$name = 'abcdef';
echo strlen($str); // 6

$string = ' ab cd ';
echo strlen($str); // 7
?>
Posted by: Guest on August-24-2020
0

counting a string in php

strlen('your strings here!');
Posted by: Guest on May-10-2021
1

get number of chars ina string php

$name = "Perú"; // With accent mark
echo strlen($name); // Display 5, because "ú" require 2 bytes.

$name = "Peru"; // Without accent mark
echo strlen($name); // Display 4
Posted by: Guest on May-13-2020
0

substr_count php

<?php

echo substr_count("Hello world. The world is nice","world");

?>
Posted by: Guest on March-25-2021

Browse Popular Code Answers by Language