Does not all the result of the loop(PHP), why?

There is a loop looking for links to pages, but the criteria the listing below
web_post function($ind = null, $params = null){

 $content = post_get('http://habrahabr.ru');

 preg_match_all('/<div class="web_http(.*?)\>/s', $content, $url);
 $x = '1';

 while($x <= $ind){

 preg_match('/data-type=" (.*?)\_ ', $url[1][$x], $url_k); if($params="=" 1){ if($type[1]="='poster'){" preg_match ('"poster" (.*?)\" $url_one); $result="$url_one[1];" $x++; } }else{ web(.*?)\" $url_two); echo result; web_post(5, 1);< code><br><br>
There are two types of parameter 1 and 0, when you specify the parameter 1 in the function<b> web_post</b> ages to load the page and nothing appears, with the parameter 0, this is not all excreted quickly. Why where is the error?<br>
Should ideally be displayed for 5 rezultatov, imediasee deliverately conditions.<br><br>
PS If you have something to explain to say.</div>
June 14th 19 at 20:12
1 answer
June 14th 19 at 20:14
Solution
if you specify the parameter 1 in the function web_post long page is loaded

Because it does not pass the condition if ($type[1]=='poster'), $x is not increased, and loops.
thank you for pointed out the error I will solve it) - gussie_Mertz commented on June 14th 19 at 20:17

Find more questions by tags E-mailPHPWeb Development