ank101302 Posted December 15, 2012 Share Posted December 15, 2012 I am trying to print checkbox selections on a different page. I have a conformation.php file which needs to show the selected choices from the order page, but all I am getting it to print is the word Array. Any ideas? I have tried for the last 30 mins to figure this out and its not coming to me on what I am doing wrong. Thanks. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 15, 2012 Share Posted December 15, 2012 You can't directly echo an array. You need to loop over it with foreach and echo each element in the loop. Quote Link to comment Share on other sites More sharing options...
ank101302 Posted December 15, 2012 Author Share Posted December 15, 2012 I am not printing an array. I am doing a project for school which requires me to make a page with a list of sandwiches and options for those sandwiches (toppings, breads, meats, etc). I need to print the conformation page with the selections for each sandwich. The only thing I can get to print is a list of sandwiches, then a list of toppings, etc. I need them to go by sandwich. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 15, 2012 Share Posted December 15, 2012 If it says 'Array', then what makes you think it's anything other than an array? Quote Link to comment Share on other sites More sharing options...
ank101302 Posted December 15, 2012 Author Share Posted December 15, 2012 I am not trying to print an array so I do not understand why it is saying array at all. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 15, 2012 Share Posted December 15, 2012 It is most assuredly an array. Post the form html, and the code that processes it. Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 15, 2012 Share Posted December 15, 2012 Yeah unless your code says echo 'Array', then you are actually trying to print an array. Do you know what an array is? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.