Question: execute the following code; describe its work; find error if you find it and explain it hi array Welcome to my home page. Some text.

execute the following code; describe its work; find error if you find it and explain it

hi array

Welcome to my home page.

Some text.

$shop = array( array("rose", 1.25 , 15), arrey("daisy", 0.75 , 25), array("orchid", 1.15 , 7) ); echo "

Manual access to each element

"; echo $shop[0][0]." costs ".$shop[0][1]." and you get ".$shop[0][2]."
"; echo $shop[1][0]." costs ".$shop[1][1]." and you get ", $shop[1][2]."
"; echo $shop[2][0]." costs ".$shop[2][1]." and you get ".$shop[2][5]."
"; echo "

Using loops to display array elements

"; echo "
    "; for ($row = 0; $row < 3; $row++) { echo "
  1. The row number $row"; echo "
      "; for ($col = 0; $col < 3; $col++) { echo "
    • ".$shop[$row][$cel]."
    • "; } echo "
    "; echo "
  2. "; } echo ""; ?>

    php ineed Ans after 1h

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!