php language system
<p>I am trying to make a script that checks, if there is define called, then call it and put it in array. But the problem is, how to check, if there is multy define with diffrent endings: example in my case: "Language_Array_Set_'.$i". If I declared four define with names
""Language_Array_Set_1,Language_Array_Set_2,Language_Array_Set_3,Language_Array_Set_4". To call all of them and put in one array.</p>

<pre><code>for($i = 0; $i &lt; Language_Number; $i++) {
    if( defined ( string 'Language_Array_Set_'.$i ) ) {
        return $available = array( 'Language_Array_Set_'.$i =&gt; 'en', 'Language_Array_Set_'.$i =&gt; 'lt');         // lt, en means that example: Language_Array_Set_1 = en
    }
}
$result = array( 'en', 'lt' );  //what do i want to show me.
</code></pre>

<p>Question where do I need to look for or what would you do in my position or how you would do? Thanks for answers.</p>

<p>Language_Number is define called in another file it holds right now number:2.</p>

<p><strong>k, here:</strong>
Possible inputs would be:</p>

<pre><code>define( "Language_Array_Set_1", "en" );
define( "Language_Array_Set_2", "lt" );
</code></pre>

<p>...</p>

<p>output:</p>

<pre><code>return  array( en, lt );
</code></pre>

<p>it needs to check how many Language_Array_Set_$number are defined and with that number make an array.</p>

<p><strong>"Álvaro G. Vicario"</strong> Thanks,
but the main problem is how to add in array three strings if there is three defines, if two then two.</p>
