How to calculate result?

Question

I want to achieve something like this:

foreach ( $posts as $post ) {
    if ( $a = $b ) ) {
        // if true +1 to the result;
    } else {
        // if not true -2 to the result;
    }
}

echo 'Your result is ...';
0
Avigo 4 weeks 2021-07-02T06:56:25-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse