Advertisement
Guest User

ex1

a guest
Feb 19th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.16 KB | None | 0 0
  1. function f1($ch)
  2. {
  3.     $res = array();
  4.     for(int $i=0; $<strlen($ch);$i++){
  5.     $char = substr($ch,i,1);
  6.     $res[$char]=substr_count($ch,$char);
  7. }
  8. return $res
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement