I am trying to convert a small bit of Ruby to PHP, and I have had success so far, except for this one line:
string = string[16,string.length-16]
I have tried these two things in PHP:
$string = substr($string, 16, strlen($string) - 16);
// and
$string = substr($string, 16, strlen($string) - 32);
But the problem is that I have no clue what the string[#,#] syntax does. I have seen string[#..#] before and string[#], but never string[#,#].
string[x,y]is a substring that starts at index x and is y characters (or bytes in 1.8) long (as opposed tostring[x..y]which starts at index x and stops at index y).