I am getting an output as object, but I want the record to be displayed in text.
Asked
Active
Viewed 154 times
-3
-
6Please do not upload images of your code! It is quite hard for us to easily modify and test your code if it is in image format. Could you update your question with the code text-based? – Tom Udding Jun 05 '17 at 06:16
-
1Write your code instead of uploading photo! – Emad Dehnavi Jun 05 '17 at 06:17
-
Don't use old deprecated `mysql_`-functions. Don't concatenate SQL queries from user provided data, use parameters. Explain exactly where you're getting this result and what debugging steps you took to find out what's happening. – Sami Kuhmonen Jun 05 '17 at 06:19
-
Do you have html string in results array ? – selvakumar Jun 05 '17 at 06:19
-
For JS: https://stackoverflow.com/questions/5612787/converting-an-object-to-a-string For PHP: https://stackoverflow.com/questions/2469222/how-to-convert-object-into-string-in-php – dekts Jun 05 '17 at 06:29
-
my problem get solved.thank you so much . – user1825 Jun 06 '17 at 05:51
2 Answers
0
You mean in the content of "#bs" and "#cost"?? Use "JSON.stringify()" you know the function, you're using it in the code
Did you mean that?
0
If you get the object, you can transform it to string of fly, outputing its properties like that:
$('#bs).html(result[1].id + result[1].title);
corresponding to name of columns, you can also
console.log(result[1])
and check in console correct property names of the object

marc_s
- 732,580
- 175
- 1,330
- 1,459

Arturas Lapinskas
- 336
- 2
- 14