A
Anonymous
Guest
Hi...Dear frnds.
I am using php.Here is a problem in php code.
I want to get the foreach loop in the form of array.
Example:
suppose here is foreach loop.
which execute for two times.
$any_array = array();
foreach($something as $anything) {
//when it is execute first time.return.
A,B,C and D.
//when it is executed for second time.return.
E,F,G and H.
$any_array[] = $anything;
}
print_r($any_array);
// it print out only " E,F,G and H. "
// but I want to get the both.
" A,B,C and D... E,F,G and H. "
How can I get it.Please tell me about this.
Here is a simple example.it is not for execute for two
time and are bigger then A,B,C and D... E,F,G and H.
what can i do for get it.
......................THANKS..........…
I am using php.Here is a problem in php code.
I want to get the foreach loop in the form of array.
Example:
suppose here is foreach loop.
which execute for two times.
$any_array = array();
foreach($something as $anything) {
//when it is execute first time.return.
A,B,C and D.
//when it is executed for second time.return.
E,F,G and H.
$any_array[] = $anything;
}
print_r($any_array);
// it print out only " E,F,G and H. "
// but I want to get the both.
" A,B,C and D... E,F,G and H. "
How can I get it.Please tell me about this.
Here is a simple example.it is not for execute for two
time and are bigger then A,B,C and D... E,F,G and H.
what can i do for get it.
......................THANKS..........…