Did you ever notice the commented lines over theme files, widget and plugin files in PHP in different CMS like WordPress etc.? These comment blocks are not there just because the developer wanted to. These lines can be there as the system may require those lines to describe the file in terms such as the name of the theme or plugin, create date, author name, update date, version number etc. These information about the file then can later be used in the system or CMS.
Tutorial
How to pass or use PHP array/variable in JavaScript?
Multidimensional PHP arrays are similar to multidimensional JSON objects. So shouldn’t be there a way to use a multidimensional PHP array in Javascript? Obviously, and there are ways. For example you can use AJAX to make a request and get the PHP array back in JSON format. However, why to make an AJAX call if the array is ready to be used already? Right.
How To Add/Remove a Label To/From Multiple Posts at a Time in Blogger?
Dear blogger users, when we start blogging with blogger we misuse labels in blogger in blog posts. We generally forget that labels in blogger blog posts are like categories. Sometimes we might also not use meaningful labels to blog posts. Instead we use meaningless labels to our blog posts. Thus after a year, when we … Read more
How to add adsense ads in the middle of the content in blogger template?
Middle of the Content is the best performing ad position for me so far among all the 5 Best Ad Positions I discussed earlier. This ad position is so effective as the reader sees the ad while reading your post and if you can blend the ad style with the style of the content then … Read more
How to add adsense ad code AFTER the CONTENT in blogger template?
After the content is one of the recommended ad positions I have already mentioned in the post 5 Best Ad Positions to Increase Adsense Revenue. In this post, we will see how we can add adsense ad code after the content of each post and page. We will do this in the blogger template so … Read more
How to add adsense ad code BEFORE the CONTENT in blogger template?
Before the content is one of the recommended ad positions I have already mentioned in the post 5 Best Ad Positions to Increase Adsense Revenue. In this post, we will see how we can add adsense ad code before the content of each post and page. We will do this in the blogger template so … Read more
How to find the data:post.body or post body in blogger template?
In blogger template, <data:post.body/> is the tag which prints out the full body of your post. This is important to know where this tag is to do things around post body. But the problem is, in some templates there can more than one <data:post.body/>. So how to find which one is the one that prints … Read more
How to get variable value from URL query string in PHP?
We already know that we can get URL query string variable in $_GET super global array. But sometimes we might have to analyze a string which is an URL with query string and need to pull out value of a given variable from that. Also, it can be that we were given only the query … Read more
How to read the RAW version of POST data in PHP?
Well when you submit data using a form or anyway and the method is POST then you get the submitted data in a super global array called $_POST. But the data in the $_POST will be slightly modified by PHP that you sometimes, as per your requirement, may not be the exact same thing you … Read more
How to use Group Names in PHP preg_match() regex to index matched results by names instead of numeric values
Using regular expressions is a very effective way to find a sub-string or all matched sub-string from a given string or text. But when you call them they give you matched results in a array with numeric indexes which is not helpful enough to get your data out of the matched results. Following is the … Read more