views:

33

answers:

1
Array ( [Screens] => 
   Array ( [0] => 
      Array ( [ SPKRS ] => 
          Array ( [price] => 455 
                  [quantity] => 3
                  [image] =>

                )
          )      
     ) [Software] => Array 
           ( [0] => Array 
             ( [Pricing] => 
                 Array ( [price] => 2 
                         [quantity] => 2 
                         [image] => SOFTWARE.png 

               [ALDELO FOR RESTAURANTS] => Array 
                       ( [price] => 535 
                         [quantity] => 1 
                         [image] =>

) ) ) [Networking] => Array
 ....

the array is $products

<?php foreach ($products as $product): ?> 
   <div class="box-active">
    <div class="line">
    <div class="text left">
    <p><?php print key($product); ?></p>

it prints 0 for all three

+3  A: 

Try this:

<?php foreach ($products as $key => $product): ?> 
   <div class="box-active">
    <div class="line">
    <div class="text left">
    <p><?php print $key; ?></p>

See manual page on foreach

NullUserException