Jump to content

PDO JSON and Return Results


NomadicJosh

Recommended Posts

I have a form which has multi-value select fields (Bootstrap) in which I can use to submit an array of data to the database. Now, the issue is I am having trouble retrieving that array with json_decode(). The issue is my array format for returning values:

<?php echo json_decode( $this->prog[0]['schoolKey']) ); ?>

When echoing out the above, I get the follow error message:

 

"stripslashes() expects parameter 1 to be string, array given in ..."

 

I know there is a easy solution, but I've been working 12 hours long and I can barely see straight. Any help with this is greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/280486-pdo-json-and-return-results/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.