Home » Posts tagged with "programming"

While coding, many of us want to see a JSON string printed right in the browser in a readable format for easy debugging. In PHP, I usually convert the JSON string back to an Array and use print_r to print the array which throws readable output in the view-source mode. In some cases we really want to print the JSON string formatted. Use the below methods. I....
You want to compare two arrays in PHP. Basically what you need is to make sure that both the arrays contain the same set of values may or may not be in the same order. You can use the built-in PHP function, array_diff to compute the difference of arrays. But this function just checks whether all the values of array1 is in array2 and if not returns the...

Page optimized by WP Minify WordPress Plugin