У меня есть что-то вроде:
<fieldset>
{% if clientFriend %}
{% set cfInfo = clientFriend.info() %}
{% endif %}
<div class="form-group">
<label for="friendName" class="hidden"></label>
<input type="text" class="form-control" placeholder="FIO"
name="friend[{{ cfInfo.id }}][name]"
{% if cfInfo.friend_name %} value="{{ cfInfo.friend_name }}" {% endif %}>
</div>
<div class="form-group">
<label for="phoneFriend" class="hidden"></label>
<input type="tel" class="form-control" placeholder="Phone"
name="friend[{{ cfInfo.id }}][phone]"
{% if cfInfo.phone_friend %} value="{{ cfInfo.phone_friend }}" {% endif %}>
</div>
<div class="form-group">
<button class="btn btn-outline-blue btn-outline-blue-sm">
Add new
</button>
</div>
</fieldset>
как я могу получить эту переменную c от $_POST
if ($_POST['friend[cfInfo.id][name]'])
к сожалению, она не работает.