Check if image exists in folder or not currupted in php

Check if image exists in folder or not currupted in php:: $full_path = Full Image path; (Like: ../dd/tmp.jpg) if(!file_exists($full_path)){     //Image Not Available or Not Exists }else{     //Image File Exists    //Check if image not damaged.     $ext = strtolower(pathinfo($full_path, PATHINFO_EXTENSION));     if ($ext === ‘jpg’) { $ext = ‘jpeg’; … Read moreCheck if image exists in folder or not currupted in php

check if exists in string in php

check if exists in string in php $a = ‘How are you?’; if (strpos($a, ‘are’) !== false) { echo ‘true’; } OR // returns true if $needle is a substring of $haystack:: function contains($needle, $haystack) { return strpos($haystack, $needle) !== false; }

Scraping Data in php

Scraping Data in php:: There is PHP Simple HTML DOM Parser. It’s fast, easy and super flexible.  There is PHP Simple HTML DOM Parser. It’s fast, easy and super flexible. It basically sticks an entire HTML page in an object then you can access any element from that object. Document Link : http://simplehtmldom.sourceforge.net/ Like:: get all … Read moreScraping Data in php

update all row in codeigniter

update all row in codeigniter   $this->db->update_batch() Generates an update string based on the data you supply, and runs the query. You can either pass an array or an object to the function. Here is an example using an array: $data = array( array( ‘title’ => ‘My title’ , ‘name’ => ‘My Name 2’ , … Read moreupdate all row in codeigniter

Two submit buttons in one form

Two submit buttons in one form:: We can use more than one submit button in a single form. We can use more than one submit button in a single form. We can give each input a different value and keep the same name or different name: #Same name Like:: <input type=”submit” name=”action” value=”Update” /> <input … Read moreTwo submit buttons in one form