Oops, wasn't looking at the rest of the code. Array values need to be appended, can't be parsed inside quotes like a normal $variable:
Code:
$this->block_data['mymodification'] = $this->profile->userinfo['field24'] ? "Stuff: ".$this->profile->userinfo['field24'] : "Nothing to see here";
Alternately, you can put that array value in a variable and put that in quotes, although I'm not sure what that would do to the ?: selector. If it works, it makes things easier to read... Example:
Code:
$field24=$this->profile->userinfo['field24'];
$this->block_data['mymodification'] = $field24 ? "Stuff: $field24" : "Nothing to see here";
I'm only intermediate at PHP, too, so I'm not sure how that would affect performance (also depends how heavily the page is used)
(p.s. If people prefer I don't answer questions here, I'll move to PM)