Ok. As I see from conversation, you want to get values, which depends on radio
.
You can do it this way:
foreach ($graphEdge as $graphNode) {
echo
"<div class='form-check mb-3'>" .
"<input type='radio' name='fb_profile' class='form-check-input' value='".$graphNode['name']."'>" .
"<img class='mr-2' src='" . $graphNode['picture']['url'] . "'>" .
"<label class='form-check-label' for='fb_profile'>" .
$graphNode['name'] . '</label>' .
"</div>";
echo "<input type='hidden' name='fb_access_token[".$graphNode['name']."]' value='" . $graphNode['access_token'] . "'>";
echo "<input type='hidden' name='fb_id[".$graphNode['name']."]' value='" . $graphNode['id'] . "'>";
}
And then you can get selected values by radio
value like this (let's suppose your form sends POST request):
$profile = $_POST['fb_profile'];
$accessToken = $_POST['fb_access_token'][$profile];
$id = $_POST['fb_id'][$profile];