PHP How to find the occurrence of each and every value in an array : i have this array and i would like to find the number of occurence of every value inside this array

                  $theArray = array(1,1,2,3,3,3,3);
I would like to have this result 

          1=2;
          2=1;
          3=4


Thanks
 