Peruttu

PHP Convert MYSQL Result To JSON

Create PHP script that will convert MySQL array to JSON formatted needed.

Simple and quick project, I need to convert a MySQL array to JSON formatted as specified.

MySQL Array example :

[{"campaign_id":"4","variant_id":"6","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"7","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"11","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"12","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"13","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"15","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"17","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"4","variant_id":"25","triggers":"{"frequency":"168","exit":"standard","scroll":"100"}"},{"campaign_id":"16","variant_id":"31","triggers":"{"frequency":"72","exit":"standard","scroll":"100"}"},{"campaign_id":"17","variant_id":"32","triggers":"{"frequency":"72","pages":"6","scroll":"75"}"}]

Result Formatted needed:

{

"campaigns": [{

"campaign_1": {

"variant_1": { "scrollConfig": true, "scroll_val": 50, "exit": true },

"variant_2": { "scrollConfig": true, "scroll_val": 50, "exit": true }

},

"campaign_2": {

"variant_1": { "specificPage": true, "page": "[url removed, login to view]" },

"variant_2": { "specificPage": true, "page": "[url removed, login to view]" }

},

"campaign_3": {

"variant_1": { "pageCount": true, "count": "3" }

},

"campaign_4": {

"variant_1": { "timedCount": true, "timer": 30 },

"variant_2": { "timedCount": true, "timer": 30 }

}

}]

}

Taidot: JSON, PHP, tietojärjestelmäarkkitehtuuri

Näytä lisää: money mysql php convert, convert html php mysql, php convert mysql mssql, mysql convert utf php, convert xls mysql php

About the Employer:
( 29 reviews ) tampa, United States

Projektin tunnus: #14396732

42 freelanceria on tarjonnut keskimäärin 28 $ tähän työhön

devikagupta

hello sir, i can do your project.... please accept my bid so that i can start it... i m expert in this type of project... u can also see my portfolio... please sir accept my bid.. please hope u will do i m waiting f Lisää

25 $ USD 0 päivässä
(379 arvostelua)
6.9
50 $ USD 1 päivässä
(145 arvostelua)
6.8
dghq123

Hello. I can do it the BEST for you. I have read the details completely. I will DO IT RIGHT NOW. Please award it to me!

50 $ USD 1 päivässä
(58 arvostelua)
6.4
PrajwalShetty

I have 10+ years of experience in software development. I have worked for big media firms in developing there Content management system, OTT Apps for roku,apple tv, amazon fire tv etc. Relevant Skills and Experience I Lisää

25 $ USD 1 päivässä
(87 arvostelua)
6.1
phpfreelancer86

Hello Sir, I've reviewed your requirement and I'm ready to work with you. I have almost 7+ years of experience in web development. I will provide quality work as well full support for any query. Relevant Skills and Ex Lisää

24 $ USD 0 päivässä
(92 arvostelua)
5.5
15 $ USD 1 päivässä
(41 arvostelua)
5.2
25 $ USD 1 päivässä
(46 arvostelua)
5.5
30 $ USD 0 päivässä
(24 arvostelua)
5.1
i333

Hi, I would love to help you with this, but it seems your output is already in the JSON format? could you confirm if you want it to be 'formatted JSONP'? because the way you represented the main 'campaigns' variable co Lisää

49 $ USD 1 päivässä
(53 arvostelua)
5.2
indiainfosoft

I've reviewed your requirement and I'm ready to work with you. I will provide quality work as well full support for any query. I'm giving you trust for good quality work. Relevant Skills and Experience I have exper Lisää

20 $ USD 0 päivässä
(57 arvostelua)
5.0
15 $ USD 1 päivässä
(14 arvostelua)
4.2
25 $ USD 1 päivässä
(12 arvostelua)
4.3
galaxycode

Hello, I can do this project, I'm an expert in PHP and I know MySQL and javascript/JSON well. Please contact me if you're interested in my work. David Relevant Skills and Experience PHP, MySQL, javascript, JSON Propo Lisää

16 $ USD 1 päivässä
(27 arvostelua)
4.1
abderrahimouakki

I can convert the mysql fetch result to json . Its part of my job as a php developer . I cn do it in less than 10min Relevant Skills and Experience I"m a pro php developer with 5 years of experience. contact me via ch Lisää

25 $ USD 0 päivässä
(19 arvostelua)
3.9
25 $ USD 1 päivässä
(14 arvostelua)
3.8
20 $ USD 1 päivässä
(20 arvostelua)
3.9
appso

"I AM READY TO START WORK RIGHT AWAY " Hello Sir / Mam, Greetings, Thank you for giving us opportunity to send our proposal on your project. I have gone through the complete requirement of your posted job. We have do Lisää

100 $ USD 1 päivässä
(16 arvostelua)
4.1
shanymathew

Dear Sir, i can convert this to json.please message to me.i can provide you 100% perfect result. please reply Relevant Skills and Experience arrays,php,json,mysql Proposed Milestones $25 USD - 1 hour

25 $ USD 1 päivässä
(13 arvostelua)
3.6
BugKillerHkg

I can complete this as your request. Relevant Skills and Experience php, javascript, laravel, rails, bootstrap ect... Proposed Milestones $30 USD - 1

30 $ USD 1 päivässä
(4 arvostelua)
3.0
manfredmarcano

10$ USD Relevant Skills and Experience Web developer specialized in Frontend (HTML5, CSS3, Javascript/jQuery), also in framework AngularJS and in CMS Wordpress (Plugins creation, PHP bugs, customization) Proposed Mil Lisää

10 $ USD 1 päivässä
(4 arvostelua)
2.7