PHP Modify the return of a loop over and over
<p>Basically I want to do a php loop that base64_encodes its self 5 times.</p>

<p>//For example
i want to encode "test" which is "dGVzdA=="<br>
then we encode "dGVzdA==" which is "ZEdWemRBPT0="<br>
then encode "ZEdWemRBPT0=" which is "WkVkV2VtUkJQVDA9"</p>

<p>I can't figure out how to create a loop that modifies its self each time it runs.</p>

<pre><code>// this is what i had

function enloop($dowork){
    for ($i=1; $i&amp;lt;=5; $i++)
    {
        return base64_encode($dowork);
    }
}
enloop($code);
</code></pre>

<p>THIS SCRIPT just repeats the encode 5 times, lets say your encodign the word test for example the output would be dGVzdA==dGVzdA==dGVzdA==dGVzdA==dGVzdA== </p>

<p>this is not what i want.</p>
