<?php
//string_count_chars.php
$var = "This is a string 'contain 'names";
echo "<br/>";
?>
<html>
<title> string_count_chars.php</title>
<body bgcolor="#E7F2F5" text="#000080">
<?php
foreach (count_chars($var, 1) as $i => $count) {
echo "There were $count instance(s) of \"" , chr($i) , "\" in the string.<br/>";
}
?>
</body>
</html>