Retrieve values from json encoded string

后端 未结 3 1849
情话喂你
情话喂你 2021-01-26 01:32

I am storing a concatenated string like this:

echo json_encode($PostedDate.$Places.$Company.$Designation.$ProjectDetails.$DesiredCandidate.$HRName.$HRContact.$Em         


        
相关标签:
3条回答
  • 2021-01-26 01:43

    put the strings onto a php array like so:

    echo json_encode(array($PostedDate,$Places,$Company));

    0 讨论(0)
  • 2021-01-26 01:50

    Put it into an array in php and then json_encode the array. Then you dont need to do your crazy split on the javascript side and you dont need to worry about preserving a position in a string.

    0 讨论(0)
  • 2021-01-26 02:02

    You may find this interesting on how to preserve array location

    0 讨论(0)
提交回复
热议问题