Hi All,
I'm trying to create a function where I generate checkboxes by querying my database, putting the data into a string variable that is the proper format for the argument for creating the array I want. But it doesn't work!
If I do this:
$ckbx=array('1'=>'Book or Booklet','2'=>'Extension Bulletin','3'=>'Map','9'=>'Other','4'=>'Pamphlet','5'=>'Poster','6'=>'Technical Report','7'=>'Video','8'=>'Web Site');
it works just fine.
But when I dynamically construct a string that has exactly the text inside the parens - lets call it $stuff, I end up with a single element in my array that is the string.
$ckbx=array($stuff);
Here $ckbx[0] is the complete string.
What do I need to do??
Thanks for any and all suggestions!
vj
I'm trying to create a function where I generate checkboxes by querying my database, putting the data into a string variable that is the proper format for the argument for creating the array I want. But it doesn't work!
If I do this:
$ckbx=array('1'=>'Book or Booklet','2'=>'Extension Bulletin','3'=>'Map','9'=>'Other','4'=>'Pamphlet','5'=>'Poster','6'=>'Technical Report','7'=>'Video','8'=>'Web Site');
it works just fine.
But when I dynamically construct a string that has exactly the text inside the parens - lets call it $stuff, I end up with a single element in my array that is the string.
$ckbx=array($stuff);
Here $ckbx[0] is the complete string.
What do I need to do??
Thanks for any and all suggestions!
vj