Question: I am developing an application which requires the youtube api.

I am stuck at a point where i need the keywords of a youtube channel. I am getting all keywords in a string.

```
$string = 'php java "john smith" plugins';

```

I am trying to get the above keywords in an array. I can use `explode(' ',$string)` but the problem is `john smith` itself is a keyword. I am expecting my array to be like this:

```
array(
   [0] => 'php',
   [1] => 'java',
   [2] => 'john smith',
   [3] => 'plugins'
) 

```

Any quick/dirty solution to achieve this ?

Answer: 
```
char *get_set(int size, char *set){// size : size of set as buffer size
    char ch;
    int i;

    for(i = 0; i < size-1 && (ch=getchar()) != '\n'; ){
        if(!isspace(ch))
            set[i++] = ch;
    }
    set[i] = '\0';
    return set;
}

```
You can use [getchar](http://linux.die.net/man/3/getchar):

```
while (((ch = getchar()) != '\n')) {
    if(!isspace(ch))
         inset[i++] = ch;
}

```

getchar reads the next character from stdin and returns it as an unsigned char cast to an int, or EOF on end of file or error.