After examining the error you are having, this is my best answer. I initially assumed you didnt need the index $i, but that was not the case since you are actually getting results when you print_r($delegates[$i]) Therefore I am lead to believe your array is a multidimensional array.
Another thing I noticed, (and I give credit to @Rizier123 who pointed out in the comments to use both single and double quotes) is that your print_r result is outputting single quotes '' around your element keys like this 'firstname' This means that you are actually storing the quotes inside your array. With all that said I believe your $delegates array looks something like this:
$delegates = array(
array(
"'firstName'" => 'Brady',
"'surname'" => 'Manning',
"'jobTitle'" => 'CEO',
"'memberNumber'" => 123456,
"'dieteryRequirements'" => 'halal',
)
);
Therefore in order to access the element you will need to use the index, and use the element with the single quotes '' like this:
echo $delegates[0]["'firstname'"]
What I would do is remove all those single quotes so that you can access them correctly.
Hope this helps.
echo delegates[$i]["'firstName'"]echo delegates['firstName']:/$icome from? is this inside an iteration? Provide that information as well as it will help giving you a better answer.