how to loop a loop in php?
<p>is there a way to loop a loop in php?</p>

<p>if i got a function for example, could i loop this function endless times?</p>

<p>in php6 there is goto. but how could u do this in php5?</p>

<pre><code>function getLinks($link) {
    // step 1: if $link got links, add them in a array
    // step 2: iterate array of links
    // step 3: save current link
    // step 4: check if current link got links, if it has, run $this-&gt;getLinks($link)
}
</code></pre>

<p>in step 4 i need to use the function getLinks. And as you can see i want to make a crawler that crawls every link and saves them.</p>

<p>has someone done anything similar, tried to loop/crawl all levels of links?</p>

<p>i think i need the Goto function here but is there a way to accomplish this in php 5?</p>

<p>i have no idea how i could do this...thanks in advance!</p>
