Sometimes any change made in WordPress site mess it’s working and we need to deactivate plugins or set default theme with alternate methods because we feel ourselves not able to access dashboard to undo changes.

Most of the times we see blank pages whenever we try to open wp admin dashboard that can happen due to any poor plugin or broken theme.

Read More

Get the last inserted ID of a MySQL table is a simple query to obtain the primary key of the record you just inserted to the table. Here I have explained the query using PDO as well as Mysqli.

Also, I have abbreviated few points while using PDO or if you are trying to get the last inserted ID of a MySQL table in PHP using other methods.

Read More

The idea behind writing a post to return data from loop in function in PHP just came into my mind because a fresher was trying to set up a function to return data from loop and hoping it would then run a return each time within the loop and the function would echo each out one by one.

Read More

Using PHP to extract img src alt and title from HTML is quite easy and this can be done in two ways. Either using PHP regular expression matching or using the Document Object Model (DOM).

Here is a DOMDocument/DOMXPath based example to extract img src alt and title from HTML using PHP.

Read More

Here is a simple jQuery Expand Collapse plug-in available to download. We have used plus/minus sign to expand/collapse content in this example and you can change them easily.

Moreover You can use nesting at any level. Clicking on anchor text to the left will take you to linked page/section. The final output will look like shown in image:

Read More

With powerful features of CSS we can show content on mouseover using CSS and we don’t need javascript. Here I have provided two examples, first contains no transition and second has CSS transition effect while hovering. You can see these examples in demo.

Read More

[ Page 18 of 22 ]