Make (in memory) database of musical instruments and database stores.
Base 1 must have:
instrument id
name of the instrument
instrument model
Base 2 must have:
shop id
stores name
stores address
*
input:
The user enters the name of the instrument in the variable at the beginning of the program.
output:
The program broadcasts a list of all the instruments of a similar name and the shops where it is located.
conditions:
Arrays and loops Must be used
I tried doing it by making a MySQL databases from arrays and then using loops on them but was told to just use the arrays and loops and not use MySQL.
This is what I have so far:
<h3>Instrument:</h3> <input type="text" name="Instrument">
<p><input type="submit" name="submit" value="Prodavnice">
<?php
$instrumenti = array (
array (1,"gitara","gibson"),
array (2,"harmonika","hohner"),
array (3,"bubnjevi","tama"),
);
$prodavnice = array (
array (4,"brothers","pijacna_8"),
array (5,"musicshop","knezmihajlova_10"),
array (6,"drums", "kneza_milosa_5"),
);
if ($Instrument = $instrumenti)
echo "Naziv prodavnice i adresa:" .$prodavnice. "<br>";
?>
Any help would be appreciated.