Voting

: max(five, zero)?
(Example: nine)

The Note You're Voting On

tweston at bangordailynews dot com
10 years ago
To account for the case that jrhodes has pointed out, we can change the line to:

substr_count ( implode( ',', $haystackArray ), $needle );

This way:

array (
0 => "mystringth",
1 => "atislong"
);

Becomes

mystringth,atislong

Which brings the count for $needle = "that" to 0 again.

<< Back to user notes page

To Top