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 -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -