Looks like you’re declaring and assigning a value to $otaname on row 5 in your snippet. But then you never actually use that variable?
Also. You use the variable $ota in your series of if-statements. The way your code is written, you’re assuming that it has a string value. But on each of the conditional statement blocks, you also output $ota[‘label’], assuming $ota is an array.
My best guess is that you’ve mixed up $ota and $otaname in your code.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users