So I am trying to tokenizes the entire string based on the space and then put those tokens into different groups based on length of those tokens. I got how to split a string by space but I am stuck on put them into different group based on the length. For example, I have a string 

> 
> Hello world, this is a test
> 
> 
> 

So after split that string by space, I want to check the length of each token and then put them into different group like

> 
> Group 1: a
> 
> 
> Group 2: is
> 
> 
> Group 3: test, this
> 
> 
> Group 4: hello, world
> 
> 
> 

This is my code so far:

```
$strLength = count($string);
$stringSpl = explode(" ", $string);

    if ($strLength <=  2) { //Here I try to check if the length is less than or equal 2 then place it into group 1
        echo "Group 1: ";

        foreach ($stringSpl as $key) {
            echo $key . "<br/>";
        }
    }

```

Any help would be great! Thank you!