Question: I have two strings in PHP:

```
$Str1 = "/welcome/files/birthday.php?business_id=0";
$Str2 = "/welcome/index.php?page=birthday";

```

I have to get word birthday from this two string with a single function.
I need a function which returns birthday on both case.

example

```
function getBaseWord($word){ 
    ...
    return $base_word;
}

getBaseWord('/welcome/files/birthday.php?business_id=0');
getBaseWord('/welcome/index.php?page=birthday');

```

both function call should return "birthday".

How can i do it.

Answer: 
If I correctly understand what you are trying to do then this should do what you need:

```
function getWord(){
     return $_GET['page'];
}

```

or $\_GET['business\_id'];

I think $\_GET is an associative array made from the GET request that was sent to the page. An associative array is one where you access something like ['name of the element'] instead of [1] or [2] or whatever.
I have no idea what you are talking about but, you can cut the word "birthday" with str\_replace and replace with another word, or you can find the position with stripos, I have no idea what we are trying to do here, so those are the only things come to my mind