:: Forum >>

phpsql code

why have the addslashes($value) being used in the above code i.e. to retrieve value from database
Eric Ilavia
Tuesday, September 4, 2007
That's probably a mistake. In javascript it is necessary to escape double quote (") and newline chars as \" and \n, however addslashes() does not handle newline, so it should be replaced with something else (regexp?)
Alex (ActiveWidgets)
Tuesday, September 4, 2007
Thank-You for ur reply Alex but i want to know why addslashes() is used in the above code i.e. what is the importance of addslashes in the above code and why is double quotes (") being used before and after addslashes
Eric Ilavia
Thursday, September 6, 2007
This code creates text output in JSON format (javascript array) which should look like this -

[
["cell1-1", "cell2-1", "cell3-1"],
["cell1-2", "cell2-2", "cell3-2"]
]

You should enclose strings in quotes or double quotes.
Alex (ActiveWidgets)
Thursday, September 6, 2007
Thank-You Alex for the reply
Eric Ilavia
Friday, September 7, 2007

This topic is archived.


Back to support forum

Forum search