dyn-web.com : JavaScript and PHP Tutorials and Scripts

PHP to JSON and JavaScript

Find out how to use PHP's json_encode function to translate PHP arrays to JSON and JavaScript. Examples demonstrate with multidimensional arrays too. Find out how to use JavaScript's JSON.parse method to parse a JSON string, how to use a reviver function with JSON.parse, and more. Read On

JavaScript to PHP

Feel like you need to reach for jQuery just to perform an Ajax request? Find out how to use XMLHttpRequest for GET and POST requests. It's easier than you might think! See also how to use JSON with Ajax. Read On

JavaScript Arrays

Does JavaScript support associative arrays? See our discussion in the JavaScript Arrays Tutorial which also covers multidimensional arrays, how to copy array values, how to add and remove array elements, how to traverse arrays, how to search and sort arrays, and more. Read On

Handling Strings in PHP

Explore PHP's string handling functions organized by category. We describe and demonstrate the string functions for searching, comparing, cleaning up, formatting and displaying, and more. Read On

Variable Type and Type Conversion in PHP

Find out how automatic type conversion works in PHP, how to check whether a variable is of a particular type, and how to change the type of a variable or value. Read On

Iframes and postMessage

Find out how to use the postMessage method for cross-domain communication with iframes. Examples show how to interact with a hidden iframe on another domain, how to set the height of an iframe cross-domain, and more. Read On

Cross-Document Communication

Find out how to communicate from one document to another when using iframes. Examples show how to reference the iframe and the document inside it, how to access the containing document from within the iframe, and how to communicate from one iframed document to another. Read On

Radio Buttons and Checkboxes

The JavaScript and Forms Tutorial includes lots of useful examples, such as how to get the value of the selected radio button, how to handle checkboxes onclick, how to make sure a checkbox is checked before submitting a form, and more. Read On

JavaScript with Select and Option Elements

Find out how to get the value of the selected option in a select box, how to get a list of multiple selections, how to add and remove options using DOM methods, how to dynamically change the options in a select box based on the selection in another, and more. Read On