<?php
$text="Hello word from the php";
echo str_word_count("$text");
?>

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: