So I have an array:
$seperatedunits = [379234748138258434, 544641634696953856, 544641634696953856, 1010101010101010]
I loop through the array:
$result = $pdo->query("SELECT * FROM activecalls");
foreach ($result as $row) {
$attachedunits = $row['attachedunits'];
$seperatedunits = explode(",",$attachedunits);
foreach ($seperatedunits as $value)
{
$getidentifier = $pdo->query("SELECT * FROM users WHERE discordid LIKE '%$value%'");
foreach ($getidentifier as $row2)
{
echo $row2['identifier'];
}
}
}
The output I'm getting with this is just 1 name:
[1L-01] Hamz
The desired output is to have 4 names come up corresponding to the id in the array.
How would I fix this so it displays all 4?