I am getting problem in how to create discrete divs when accessing the function's returned value into a while loop, but I want that divs to be created one outside the other instead of being created one inside the other. See the below code:
Bash
html> head> title>sdcsdzctitle> head> body> php $j=0; while($j2) { $url=array("http://www.w3schools.com/html/default.asp","http://www.w3schools.com/js/default.asp","http://www.w3schools.com/sql/default.asp"); $data=crawl_page($url[$j]); echo " div style=' background-color: #E7EFEF;width:84%;border:1px solid #A5BEBE;'> div style='background-color: white;border:1px solid #A5BEBE;'> $data[0] div> div>"; $j++; } function crawl_page($b) { $a=fopen($b,"r"); $contents=stream_get_contents($a); fclose($a); $contents=strtolower($contents); $start='; $start_pos=strpos($contents,$start); $first_trim=substr($contents,$start_pos); $stop='
'; $stop_pos=strpos($first_trim,$stop); $second_trim=substr($first_trim,0,$stop_pos); $out['0'] = $second_trim; return $out; } ?> body> html>
Answers
Know the answer? Post it. Somebody with the same question will find it here.