Jump to content

help arrays!


Pupe

Recommended Posts

please answer  this question in php..

 

 

 

 

I need three arrays,One with shops, second with other instruments, and the third with the links between them. For example:
 
 
 
$instruments = array(array(1,"Guitar"),array(2,"Drums"));
$stores = array(array(5,"My Store"),array(10,"Your store"));
$connections = array(array(1,5),array(1,10),array(2,5));
 
Then, based on the variable defined in the program, for example:
$search="Guitar";
 
Then must do this,need to find a shop where the requested instrument. First, from the first series download id instrument (for example, the guitar has id 1).
Then, from the $ connections and find all the shops where there is (that are members of the 0 and 1, respectively, shop with IDs 5 and 10)
Finally, from the $ stores, download, store names (in this example are 5 and 10).

:sweat:

Link to comment
https://forums.phpfreaks.com/topic/278369-help-arrays/
Share on other sites

can you resolve all code here..

You might have missed it. Let me quote it here for you so you don't need to scroll up:

[I]f you make an effort we might be able to help you. We won't do it for you.

Write something yourself. Try it. If it doesn't work then come back, post the code, and tell us how is it not working. Then we'll give you suggestions on how to change it. Rinse and repeat.

Link to comment
https://forums.phpfreaks.com/topic/278369-help-arrays/#findComment-1432343
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.