Php reads data from the database and sends it to ios through json. I read the data from the database in php, put the read data into a json string, and then send it to ios, however, I found that all the read data has changed to 1, and then I checked on the php end whether the value of one of the queries is a string that I know. if it is the same, assign this string to it and then pass it back as a normal string.
Reply to discussion (solution)
I don't understand. what types of data have all become 1?
Paste the code
Solve the problem. if I put the data queried from the database in the string connection, there will be a problem. if I put the data directly in the array, there will be no problem.
I recently learned ios... I don't know how to read data from the database. how does php send data to ios...
Hello everyone, I do not understand how can I display the read data normally if the articles stored in the database have the font format, font size, and line breaks? I put the read data on lable to display the format settings. The teacher said that it would be okay after parsing, but I am not very good at setting the format, so I would like to ask if the great god knows how to solve the problem ..... hope you can reply .... thank you.