foreach ($_GET['friend_name'] as $id => $key) {
if (!empty($_GET['friend_vorname'][$id])) {
var_dump($_GET['friend_anrede_'.$id][0]);
$msg .= 'Anrede: ' . $_SESSION['friend_anrede'][$id][$id] .'<br>Vorname: '
. $_GET['friend_vorname'][$id] . '<br>Name: '
. $_GET['friend_name'][$id] . '<br>Strasse / Nr.: '
. $_GET['friend_strasse_nr'][$id] . '<br>PLZ / Ort: '
. $_GET['friend_plz_ort'][$id] . '<br><br>';
}
}
The var_dump() returns:
string(4) "Frau" string(4) "Herr" string(4) "Frau"
I would now like to use the single stings for my variable $msg just like all the other variables.
I thought $_SESSION['friend_anrede'][$id][$id] would make it but it only returns:
F
I would be very glad if someone could get me out of this array labyrinth!
$_SESSION['friend_anrede'][$id][$id]to$_SESSION['friend_anrede'][$id]? Not either sure I understand, though.$_SESSION['friend_anrede'][$id]only returns: Frau