Click here to Skip to main content
15,867,686 members
Home / Discussions / Web Development
   

Web Development

 
QuestionPHP 7.4, best practice to establish a database connection Pin
jkirkerx2-Feb-21 8:10
professionaljkirkerx2-Feb-21 8:10 
QuestionWhich will be the best web development course for kids? Pin
Annet Rose13-Jan-21 23:35
Annet Rose13-Jan-21 23:35 
AnswerRe: Which will be the best web development course for kids? Pin
Richard MacCutchan14-Jan-21 0:37
mveRichard MacCutchan14-Jan-21 0:37 
RantHTML Emails - Printing Pin
Gripper 1070963823-Dec-20 6:08
Gripper 1070963823-Dec-20 6:08 
QuestionPHP 4.7, JSON and HTTP response header payload, json_encode Pin
jkirkerx19-Dec-20 11:31
professionaljkirkerx19-Dec-20 11:31 
AnswerRe: PHP 4.7, JSON and HTTP response header payload, json_encode Pin
Peter_in_278019-Dec-20 15:02
professionalPeter_in_278019-Dec-20 15:02 
GeneralRe: PHP 4.7, JSON and HTTP response header payload, json_encode Pin
jkirkerx20-Dec-20 8:01
professionaljkirkerx20-Dec-20 8:01 
AnswerRe: PHP 4.7, JSON and HTTP response header payload, json_encode Pin
Graham Breach20-Dec-20 5:02
Graham Breach20-Dec-20 5:02 
It looks like you are creating a string in JSON format, then passing it to json_encode() where it is trying to turn it into more JSON. Unless you are actually trying to embed your JSON in the JSON that json_encode() produces, that doesn't make much sense.

This is how json_encode() is supposed to work:
PHP
// a PHP array of data
$data = array(
  "projectNumber" => $sess_proj_no,
  "projectStage" => $sess_proj_stage,
  "newVersion" => $new_version_no,
  "undefinedValue" => array(
    "projectNumber" => $projectNumber,
    "variableContingencyCost" => $variableContingencyValue,
    "variableContingencyValue" => $variableContingencyRate,
    "actualPlusContingencyCost" => $actualPlusContingencyCost,
  ),
);

// convert to JSON string
$json = json_encode($data);

GeneralRe: PHP 4.7, JSON and HTTP response header payload, json_encode Pin
jkirkerx20-Dec-20 8:04
professionaljkirkerx20-Dec-20 8:04 
QuestionI might be wrong about Firefox BOOKMARK behavior ... but Pin
RedDk19-Dec-20 8:36
RedDk19-Dec-20 8:36 
QuestionMVC control libraries Pin
#realJSOP18-Dec-20 2:28
mve#realJSOP18-Dec-20 2:28 
AnswerRe: MVC control libraries Pin
Richard Deeming18-Dec-20 3:04
mveRichard Deeming18-Dec-20 3:04 
GeneralRe: MVC control libraries Pin
#realJSOP18-Dec-20 3:46
mve#realJSOP18-Dec-20 3:46 
GeneralRe: MVC control libraries Pin
Richard Deeming18-Dec-20 3:49
mveRichard Deeming18-Dec-20 3:49 
GeneralRe: MVC control libraries Pin
#realJSOP19-Dec-20 2:10
mve#realJSOP19-Dec-20 2:10 
GeneralRe: MVC control libraries Pin
#realJSOP20-Dec-20 3:51
mve#realJSOP20-Dec-20 3:51 
QuestionDebugging two ASP.NET projects with Chrome - Failed to launch debug adapter Pin
glen20516-Dec-20 21:55
glen20516-Dec-20 21:55 
AnswerRe: Debugging two ASP.NET projects with Chrome - Failed to launch debug adapter Pin
F-ES Sitecore17-Dec-20 22:51
professionalF-ES Sitecore17-Dec-20 22:51 
QuestionPHP4.3 Mod, coloring table rows Pin
jkirkerx1-Dec-20 9:29
professionaljkirkerx1-Dec-20 9:29 
AnswerRe: PHP4.3 Mod, coloring table rows [solved] Pin
jkirkerx1-Dec-20 9:34
professionaljkirkerx1-Dec-20 9:34 
AnswerRe: PHP4.3 Mod, coloring table rows Pin
Richard Deeming1-Dec-20 21:55
mveRichard Deeming1-Dec-20 21:55 
GeneralRe: PHP4.3 Mod, coloring table rows Pin
jkirkerx2-Dec-20 8:30
professionaljkirkerx2-Dec-20 8:30 
QuestionHow to insert roles in php and mysql? Pin
Nicolas Veloso16-Nov-20 6:04
Nicolas Veloso16-Nov-20 6:04 
SuggestionRe: How to insert roles in php and mysql? Pin
Richard Deeming16-Nov-20 21:51
mveRichard Deeming16-Nov-20 21:51 
QuestionBlazor SPA Pin
Super Lloyd16-Nov-20 1:26
Super Lloyd16-Nov-20 1:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.