those will look for a full match (i.e. the complete value must match the given string). but you only have a partial match. not sure why you would expect those to work since the use cases are clearly described and shown in the Manual.
I guess trying random variations like singe ↔ double quotes, with ↔ without slashes, and different functions etc. without understanding what is happening is part of the learning process. I confess I did it when I started and some rare times doing so “worked” or at least seemed to.
But I long ago realized that sifting through the documentation and looking at the examples yielded much better use of my time in getting to a solution than testing guesses.
As Dormilich posted, those functions deal with exact array values as a whole, not value components.
I think you will need to use a callback that uses string functions inside it to test for the presence of the needle.
AFAIK they should either already take the key as a parameter or have a Flag that lets you send it as one.
As far as finding the string, I doesn’t look like any regex would be needed so a string function should be sufficient. Though you may want “mb” if you are dealing with characters outside of the 0-127 range.
* pay note to documentation when it says to use the “===” operator,
strpos() - Find the position of the first occurrence of a substring in a string
stripos() - Find the position of the first occurrence of a case-insensitive substring in a string
strrpos() - Find the position of the last occurrence of a substring in a string
strripos() - Find the position of the last occurrence of a case-insensitive substring in a string
strstr() - Find the first occurrence of a string