PHP equivilent of Javascript's substring()?

Hamiltonzth

New Member
Javascript has two handy substring functions: \[code\]substring(from,to)\[/code\] and \[code\]substr(start,length)\[/code\].This means I can decide "when I get my substring starting from position X, do I want to specify what string position to end on or how many characters long the substring is?"(One nice usage of the \[code\]from, to\[/code\] version is to use \[code\]search()\[/code\] to determine both positions.)PHP's \[code\]substr()\[/code\] lets you specify the length of the substring. Is there a built-in string function to let you specify the character position to end on?
 
Back
Top