How to preserve variable type when posting to php from javascript -


when use ajax post data javascript php, php $_post variables strings. there way preserve variable type when posting. eg when posting boolean true want boolean true , not string 'true'.

you can use json format , php json parser you.

you can find example here:

http://php.net/manual/en/function.json-decode.php#90790


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -