Pulling two objects from two separate arrays in a foreach
I'm sure I'm over-thinking this, any help to steer me straight is
appreciated. I need to pull two array variables and place them in a link
so that I can I can apply them to another form in order to change their
respective arrays (these links are used to pull recipient names and their
uid values that are stored in a session arrays.) So, in my foreach, the
"$contactlistunique as $rec" line seems to work fine in order to pull the
username, but now I need to figure out a way to pull the uid object.
Foreach operations don't allow for multiple conditions, so what's the
smartest way to do this?
<?php
$contactlistuidunique = array_unique($_SESSION['recipientlist']);
$contactlistunique = array_unique($_SESSION['contactlist']);
foreach ($contactlistunique as $rec)
{
echo "<font color=#808080><a
href='removecontact.php?contact=$recuid&recipient=$rec'
STYLE='TEXT-DECORATION: NONE'>
<font color=#808080>" . $rec . "</a></font>";
}
?>
No comments:
Post a Comment