M
M
Maxim E2015-05-31 19:38:39
css
Maxim E, 2015-05-31 19:38:39

Why is the php foreach loop not firing?

There is an array coming in $_POST

Array
(
    [tovar] => Array
        (
            [0] => Array
                (
                    ['bname'] => Капуста номер раз!
                    ['bqty'] => 1
                    ['bprice'] => 50
                    ['bid'] => 34
                )

        ))

It is necessary to run a cycle for each product, therefore I write:
$tovars = $_POST['tovar'];
foreach($tovars as $tovar){
echo $tovar['bid'];
}

But nothing happens. what could be the problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
ljutaev, 2018-07-25
@Blackmilk4

Hey!
https://greensock.com/
https://greensock.com/examples-showcases
https://threejs.org/prinzhorn.github.io/skrollr
_

A
Alexander Talalaev, 2018-07-25
@neuotq

The work there is primarily a designer, and the effect itself is the use and change of the css transform property , in particular, changes in values scale​​for scaling, for example.
Well, then the js scripts work out the logic and animation scripts.

R
Rikcon, 2018-07-25
@Rikcon

matthew.wagerfield.com/parallax
The maximum that I remembered is similar.

R
Rsa97, 2015-05-31
@creativeworm

array(4) { ["'bname'"]=> string(33) "Капуста номер раз!" ["'bqty'"]=> string(1) "1" ["'bprice'"]=> string(2) "50" ["'bid'"]=> string(2) "34" }

For some reason, you get not ['bid'], but ["'bid'"]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question