I have been working on this for the past 4 hours non-stop. I have searched the forums, other forums, the manual, and I just do not get the arrays yet.
I have found an open source email program that displays attachments. What I want to do is make "$ATTACH" in the code below to be an array so that the code will iterate and provide the results of the iteration connected to 3 variables.
$ATTACH1 // Would be a link to download.php?pid=1
$ATTACH2 // Would be a link to download.php?pid=2
$ATTACH3 // Would be a link to download.php?pid=3
-------------------- BEGIN CODE ----------------------------
if (is_array($attachments))
{
// display as list
for($x=0; $x<sizeof($attachments); $x++)
{
$ATTACH = "<li><a href=download.php?pid=" . $attachments[$x]["pid"] . ">" . $attachments[$x]["name"] . " (" . ceil($attachments[$x]["size"]/1024) . " KB)</a>";
}
}
---------- END CODE --------------------
If someone could give me a jump start, an example using my code, I will be very grateful. I am not an excellent coder, I am self taught, and arrays are giving me a lot of trouble.
Thanks in advance.