Parse json data error in javascript

Whenever parse the encoded json data through jquery function $.parseJSON(data) ,It checks for json object format so parse json data error occur for the json array formated data pass in the function. To solve this issue data encode with the json_encode($data,JSON_FORCE_OBJECT).Read more …

How to replace the src attribute of the img tag from given html in php.

Here is the code for replace the ‘src’ attribute of the img tag from given html and return well formed html with new src content. $doc = new DOMDocument(); @$doc->loadHTML($html); $tags = $doc->getElementsByTagName(‘img’); foreach ($tags as $tag) { $old_src = $tag->getAttribute(‘src’); $new_src_url = WEBURL.$old_src; $tag->setAttribute(‘src’, $new_src_url); } $new_content = $doc->saveHTML();Read more …
Alpa Mori

Create Obb file in Android

I have three file – (exp.- a.mp3, b.mp3, c.mp3) Now,​ select all three files and compress using “zip compression”. File Name must be in this format : ​ <main>.<expansion-version>.<package-name>.obb ● <main>​ – The ​ main​ expansion file is the primary expansion file for additional resources required by your application. ●...Read more …