fork(1) download
  1. <?php
  2.  
  3. $str = 'Maria Joaquina Maria Antonienta Maria B';
  4. $str = explode( ' ' , $str );
  5. $str = array_count_values( $str );
  6. print_r( $str );
  7. print_r( key( $str ) );
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [Maria] => 3
    [Joaquina] => 1
    [Antonienta] => 1
    [B] => 1
)
Maria