How to use explode to grab users
<p>So i am making an inbox and down the side i want all the users this one user has messaged</p>

<p>So this part of the code is in the config.php script</p>

<pre><code>$userassoc = "SELECT * FROM users WHERE `id` = '".$_SESSION['id']."'";
$usercon = $conn-&gt;query($userassoc);
$user = mysqli_fetch_array($usercon, MYSQLI_ASSOC);
</code></pre>

<p>Then i use this in inbox.php</p>

<pre><code>//find users
$users = explode(',', $user['mid']);
</code></pre>

<p>$user['mid'] = (2,3,4)</p>

<p>And 2,3,4 are all users for example 2 = user1 3 = user2 3 = user3</p>

<p>I want it to split them up and then grab information from each user in the $user['mid'] and i know i have to use Explode but i'm not sure where to go after iv used it</p>