strlen('your strings here!');
echo substr_count("Hello world. The world is nice","world"); //result 2
#Text must be in double-qoutes in brackets echo str_word_count("Text goes here...");