PHP Left

There is no function in PHP equivalent to VB or ASP’s left. There is a more robust function called substr. Here’s a function from the forums that replicates the functionality.


function left($string, $count){
return substr($string, 0, $count);
}