The easiest way is to JSON-encode your object and then decode it back to an array: $array = json_decode(json_encode($object), True); you can traverse the object …
Read MoreJson
Reload Parent window From Child Window
Reload Parent window from pop-up child window:: window.opener.location.reload(false) https://developer.mozilla.org/en-US/docs/Web/API/Window
Read Morehow to load differ image depending on screen width
<script> if (document.documentElement.clientWidth > 940) { document.write(‘<img class=”<?php echo “ligncenter size-full “.$imgInfo[$randno][id];?>” src=”<?php echo $imgInfo[$randno][src];?>” title=”<?php echo $imgInfo[$randno][title];?>” alt=”<?php echo $imgInfo[$randno][alt];?>” />’); } </script>
Read Morehow to remove div using javascript
var element = document.getElementById(“element-id”); element.parentNode.removeChild(element);
Read Morehow to encode json data in php
Encode: json_encode( array(‘id’=>$i, ‘name’ => $row[‘name’]) ); Or $arr = array( ‘id’=>$i, ‘name’ => $row[‘name’], ); json_encode($arr); Decode: $decoded = json_decode($arr);
Read More