Voting

: min(eight, zero)?
(Example: nine)

The Note You're Voting On

mlong at mlong dot org
23 years ago
// Usefulness of the two functions

<?php
$string
="aaabbc";

// You just want to count the letter a
$acount=substr_count($string,"a");

// You want to count both letter a and letter b
$counts=count_chars($string,0);
$acount=$counts[ord("a")];
$bcount=$counts[ord("b")];
?>

<< Back to user notes page

To Top