Voting

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

The Note You're Voting On

kriskra at gmail dot com
17 years ago
The javascript charAt equivalent in php of felipe has a little bug. It's necessary to compare the type (implicit) aswell or the function returns a wrong result:
<?php
function charAt($str,$pos) {
return (
substr($str,$pos,1) !== false) ? substr($str,$pos,1) : -1;
}
?>

<< Back to user notes page

To Top