Posted By

sekihin on 01/31/10


Tagged

String


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

seloh77


PHP left and right


 / Published in: PHP
 

  1. <?php
  2.  
  3. function right($value, $count){
  4. return substr($value, ($count*-1));
  5. }
  6.  
  7. function left($string, $count){
  8. return substr($string, 0, $count);
  9. }
  10.  
  11. ?>

Report this snippet  

You need to login to post a comment.