If and else statements on upload form!
Moderator: General Moderators
-
lisa evans
- Forum Newbie
- Posts: 9
- Joined: Fri Dec 09, 2011 6:42 pm
Re: If and else statements on upload form!
Thank you very much and can you give me an example of the nested loop that will be required to display the messages of $result?
Re: If and else statements on upload form!
Code: Select all
<?php
header('Content-Type: text/plain');
$array = array (
'A' => array (
'a',
'b',
'c'
),
'B' => array (
'd',
'e',
'f'
),
);
$array['C'][] = 'g';
foreach ($array as $key => $child) {
echo "+ $key\n";
foreach ($child as $value) {
echo " - $value\n";
}
}
/*
+ A
- a
- b
- c
+ B
- d
- e
- f
+ C
- g
*/-
lisa evans
- Forum Newbie
- Posts: 9
- Joined: Fri Dec 09, 2011 6:42 pm
Re: If and else statements on upload form!
Many thanks!