Link to home
Start Free TrialLog in
Avatar of taynet29
taynet29

asked on

Array in an Array

When I am retrieving the value for the $_FILES super global I am getting Array returned.  How do I get the value of the elements inside the array to get returned?

<label for="file"><strong>File:</strong> <?php echo $details['file'] ?></label><br />

Form
<?php foreach ($cars as $car => $details) { ?>
<h3><?php print $car ?></h3>
  <label for="format"><strong>Format:</strong> <?php echo $details['format'] ?></label><br />
  <label for="rotation"><strong>Rotation(%):</strong> <?php echo $details['rotation'] ?></label><br />
  <label for="size"><strong>Size:</strong>
  <?php echo $details['724x90']; ?> &nbsp;
  <?php echo $details['300x250']; ?> &nbsp;
  <?php echo $details['160x600']; ?></label> &nbsp; &nbsp; &nbsp;
  <label for='other'><strong>Other:</strong> <?php echo $details['othertx'] ?> </label><br />
  <label for="layout"><strong>Layout:</strong> <?php echo $details['layout'] ?></label><br />
  <label for="bannerlink"><strong>Banner Link:</strong> <?php echo $details['bannerlink'] ?></label><br />
  <label for="file"><strong>File:</strong> <?php echo $details['file'] ?></label><br />
  <label for="dspecific"><strong>Deal Specifics:</strong> <?php echo $details['dspecific'] ?></label><br />
  <label for="disclaimer"><strong>Disclaimer:</strong> <?php echo $details['disclaimer'] ?></label><br /><br /><br />
<?php  }  ?>

SOLUTION
Avatar of steelseth12
steelseth12
Flag of Cyprus image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of taynet29
taynet29

ASKER

All the arrays are being printed on the "Work Order Review" page.  All I am asking is how do I get the variable to print as an array.  Keep in mind it is being stored as an Array in $details.  Then the $_FILES array.  As a result, <?php echo $details['file'] ?> prints ---> Array.  

What I have tried is
<?php if(isset($_FILES["file"][0])) ?>
<?php if(isset($_FILES["file"]["name"])) ?>
<?php if(isset($details["file"][1])) ?>
<?php if(isset($details["file"]["name"])) ?>

They all do not return a value.

Please let me know what I am doing incorrectly.  How do I print the file name?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial