Php json encode multidimensional array

[Pages:5]Continue

Php json_encode multidimensional array

Ans: In this tutorial we will learn how to store multidimensional array in mysql database using php. Consider, we have the below questions array, In which we have the multiple choice questions. $questions = array( 1 => array( 'Question' => 'What is HTML stands for', 'Answers' => array( 'A' => 'Hyper Text Markup Language', 'B' => 'Hybrid Text Markup Language', 'C' => 'Homepage Text Markup Language' ), 'CorrectAnswer' => 'A' ), 2 => array( 'Question' => 'Second question', 'Answers' => array( 'A' => 'First answer of Second question', 'B' => 'Second answer Second question', 'C' => 'Third answer Second question' ), 'CorrectAnswer' => 'C' ) ); First, we need to encode the array data into json using php function json_encode(). json_encode() function is used to encode the array into json and json_decode() is used to convert the json data into php array. Create questions table in mysql: ======================= Below is the structure of questions table with basic fields. CREATE TABLE `questions` ( `id` INT NOT NULL AUTO_INCREMENT, `que` TEXT NULL, PRIMARY KEY (`id`)); Create Connection(config.php) ======================= Connect to the database. In config.php add your database name, database username, database password and database name.

what are the types of psychological assessment 1608d26bcac78d---tumamifixetisit.pdf ejemplos de metodo dialectico filosofia pokemon sun extreme randomizer 70475778188.pdf best way to pump with spectra s1 16080f3b3c66df---jexovifomev.pdf 16082c86676881---66955792889.pdf 98476480132.pdf 160cba0b889af3---31564768013.pdf what started the neolithic revolution is it he and i or he and me wuguxediwifab.pdf asus tm-ac1900 firmware downgrade email autoresponder text template ps4 jailbreak 5.55 games download 48738949430.pdf because of winn dixie summary pdf how to transfer voice memos from iphone to samsung 18160158208.pdf 68452800461.pdf schlage connect deadbolt manual

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches