0

ive got an array like this:

$display_related_tags[0][20] = 'text1';
$display_related_tags[1][21] = 'text2';
$display_related_tags[2][22] = 'text3';

i want to either check if value (text1) exists or if key (20) exists but the mentioned array functions just apply to one dimensional arrays.

what are my alternatives without having to use loops (it will be too heavy then)

1 Answer 1

4

what are my alternatives without having to use loops (it will be too heavy then)

You don't have any other options that to loop (at some level) over the first dimension. The only other way would be to restructure your data.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.