/    Sign up×
Community /Pin to ProfileBookmark

[php] Array Sorting

Okay please do bear with me this is hard to explain.

Firstly say i have these two arrays

[code]
Array
(
[15] => Array
(
[0] => 18
[1] => 15
)

[16] => Array
(
[0] => 17
[1] => 19
[2] => 16
)

)

Array
(
[18] => Array
(
[topic_id] => 1
[forum_id] => 18
[title] => sdfdsf
)

)
[/code]

And say i am currently doing a loop where lets say $id has gotten to “15”. As you can see the first array with “15” has “15” and “18” in it.

The second array has “18”.

What i want is to be able to pick that up, so then i can use the information like “title” and “topic_id”.

Any help on how to do that would be great!

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @liamdawe spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...