PHP class for working with text

In one of my jobs, I needed to get the page code and solve several problems, I won't go deep, what was that job, but by collecting the necessary functions and writing some of them, I completed the task. I put some of the functions into a class and now I decided to share these functions with my readers.

Problems that were solved in this class

  1. Cleaning up all tags in code;
  2. remove extra characters and words, which were not of great importance in further analysis of the text;
  3. deleting sections of code, which do not take part in the indexing of the page and do not affect the issuance in search engines;

Class for cleaning html code and working with text

Below is an example of using the class. The class is used to clean up the code and leave only the text.
Here is a memo to the programmer. I think many will be useful for their projects. Good luck in website development.

Купить хостинг WordPress
/* WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal