I have a function named category_name() which use in a while loop give me a different value everytime I echo it.
I have another function named query_item() which is use in the same loop. I need to get result from first function in the second function.
Can I use call_user_func() and - how / what - do I need to do?
Explenation in PhP manual is complexed.
EXAMPLE
first loop
category_name() is Building1
query_item(Building1) is Room1, Room2
second loop
Second loop category_name() is Building2
Second loop query_item(Building2) is Room4, Room5
So, using the second function, with value of first function, would give me the rooms inside the building.
Please explain to me using the example. I am open to functions alternatives.