C
C
Counter2018-02-08 19:38:13
PHP
Counter, 2018-02-08 19:38:13

How to make an infinite check for parameter compliance with a given number when making requests to api?

Condition, api can return "0" from 2 to +~ times in a row.
You need to make requests to the api until it returns 1.
How can such a check be correctly implemented in php?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stimulate, 2018-02-08
@Counter

$return = null;
while ($return != 1) {
    $return = api_result;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question