Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Array Help


Recommended Posts

I used array in the folling manner and didn't have a problem until the array number is over 9.



$size_array = array('','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');


$size_array = array('','1','2','3','4','5','6','7','8','9');


these are no problem but the following only displays the first character?


$size_array = array('','11','12','13','14','15','16','17','18','19');


Any ideas? :?

Link to comment
Share on other sites

I assume from the error you are getting that you are tyring to build an array for a dropdown box.


If so you need to build the array differently. Look at how it's done in other parts of osc.


The array for the tep drop down box function is actually an array of arrays where each array element is an array('id'=>$id, 'text'=>$option);




$size_array = array();

$size_array[] = array('id'=>'s', 'text'=>'Small');

$size_array[] = array('id'=>'m', 'text'=>'Medium');

$size_array[] = array('id'=>'l', 'text'=>'Large');

Trust me, I'm an Accountant.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...