'discount' => 0, '9' => [ function get_product_discount($id) { font-size: 13px; You may use the PHP while loop with arrays as well. position: relative; 'features' => ['Everything fits', 'You can plant a flower in it', 'Hides the cat'] overflow: hidden; font-size: 28px; 'features' => ['Glitters', 'Shines', 'Looks expensive', 'Can be hung'] Write a while loop in the product.php script. font-style: italic; background-repeat: no-repeat; width: 210px; This for loop is iterated on the sequence of numbers starting from the number till 1 is reached. height: 52px; box-shadow: inset 0 2px 10px #c86c00; ], margin: 0 0 2px 0; while − loops through a block of code if and as long as a specified condition is true. $products = get_products(); 'price' => 15000, font-family: "Arial", "Helvetica", sans-serif; 'features' => ['Nostalgic', 'Fits into any interior', 'Your neighbors will envy it', 'Stylish'] .site-footer .container { .navigation-list a:focus { font-size: 15px; 'is_last' => false, display: flex; margin: 14px 0 0;
    margin-left: 15px; display: flex; The while loop syntax is similar to the syntax used by conditional statements — it consists of the loop name, loop condition, and loop body. } } } background-color: #ff8a00; php,mysql. } background-position: center; font-style: italic; color: #000000; background-image: url("img/brands-ehm.svg"); font-weight: 700; It’s essentially a longer or code-bulkier way of executing a while loop, which in a way, is pretty pointless. ], 'title' => 'Nmiao pillow', .map-link:focus { 'features' => ['Soft', 'Cozy', 'Cats and children love it', 'Hides stains', 'Easy to clean'] .item-advantages li { border-radius: 4px; 'type' => 'other', 'is_last' => false, 'is_new' => true, .contacts, display: block; background-color: orange; }
  • In PHP, we have the following loop types: while - loops through a block of code as long as the specified condition is true. min-width: 550px; flex-wrap: wrap; 'is_last' => false,