PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.

PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP

PHP: Exception handling (Handling Fatal errors in your code)

The PHP is one of the popular server scripts for many of the websites. While our PHP code has any errors in code or data execution automatically stops. To resolve the abnormal terminations we trying to handle those exceptions. The core PHP classes Exception and Error help with runtime errors. The below syntax and example code help to demonstrate how to use the Exception classes in PHP.

PHP : Merge multiple PDF files into single PDF[Resolving timeout error]

The TCPDF is a PHP library used to create PDF files in PHP language. Using the TCPDF we can create tabled pdf, HTML and image pdf files. While creating PDF for the huge document may get timeout error to process. This is because TCPDF trying to build the DOM object to process the PDF file, this construction is the reason for timeout error. We couldn't try batch operation like CSV write(For CSV we can append content incrementally). To resolve this problem we can create small PDF files at final we combine those files into a single PDF file by merge.

PHP: Get/Strip particular element from HTML

The below is the sample code for strip a particular HTML element from given string HTML. Using this function we can able to get particular div, span, p, body, article,.. any HTML wrapped element by its class or id. This function accepts 4 parameters, HTML string to get particular Tag, Strip tag name, Identifier name Class or Id and Identifier Class name or Id name.

PHP : Encoding specials symbols into HTML entities and Decoding HTML entities to special symbols with Example

In HTML normal special characters are considered as entities. So normally these are encoded as string. Normally &, <, >, ‘ and “ are special symbols. In PHP we can able to encode special symbols into HTML entity vice versa able to decode HTML entities into special symbols.