Question: \*\* UPDATE \*\*
The code is working now. But Now I would like to have a `div` display the sessions saved. This div is on the same page as the items and is called `items` I tried using a refresh script. But this doesn't work.

Is this posible via jQuery or should I use AJAX (I'm not really "into" Ajax yet)...

Owke, lets see if I can explain this the best I can... I'm using Wordpress for a site I'm making now I would like to store the "liked" items a custom clicks.

So what I did was open a session in my header

```
<?php
    session_start();
?>

```

Then on the page that needs to store the "like" I have the following code:

```
<?php
    // Set session variables
    $_SESSION["item"] = get_the_title();
?>

```

And where I would like to `echo` it I placed this code:

```
<?php
    if(isset($_SESSION['item'])){
    echo $_SESSION['item'];
    };
?>

```

This all works like it should, BUT there are multiple items a custom could like on one page. AND I would like to store all of them in my session. But it only stores 1 session at a time. 

Do I need to work with numbers of prefixes, like item-x and item-y?

I found this bit of code: [link](https://stackoverflow.com/a/2223870/4367486)

But because I'm using Wordpress and I just want the title I cant replace $apples, $oranges and $pears with your product ids. Because for me its just 

`<?php the_title(); ?>`

So this, for me, won't work:

```
<?php
    // Set session variables
    $_SESSION["boot"] = array(); 
    $_SESSION["boot"][] = the_title();
?>

```

Every time... how to get this to work?

Answer: 
```
foreach($currentFile in $listOfTestFiles)
{
    switch -wildcard ($currentFile.Name)
    {
        "*Test1*" {$ParameterSet="Type1,$SomeOtherVariable"}
        "*Test2*" {$ParameterSet="Type2,$SomeOtherVariable"}
        "*Test3*" {$ParameterSet="Type3,$SomeOtherVariable"}
        "*Test4*" {$ParameterSet="Type4,$SomeOtherVariable"}
        default {"Default Behaviour"}
    }
    $JobArray += Start-Job -ScriptBlock $func -ArgumentList $ParameterSet
    $JobArray | Receive-Job -Wait 
}

```

Note that I didn't test this code, but I followed Microsoft example from [here](https://technet.microsoft.com/en-us/library/ff730937.aspx)
You can do the following:

```
    switch ($currentFile)
{
    {$_.name.contains("Test1")} {$ParameterSet="Type1,$SomeOtherVariable"}
    {$_.name.contains("Test2")} {$ParameterSet="Type2,$SomeOtherVariable"}
    Default {}

}

```