update page now

Voting

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

The Note You're Voting On

ivanhoe011 at gmail dot com
20 years ago
If you need just a single character from the string you don't need to use substr(), just use curly braces notation:

<?php
    // both lines will output the 3rd character
    echo substr($my_string, 2, 1);
    echo $my_string{2};  
?>

curly braces syntax is faster and more readable IMHO..

<< Back to user notes page

To Top