Posts Tagged with 'PHP'
Best Way to List Alphabetical (A-Z) Using PHP
Generating an alphabetical list from A to Z in PHP is a common requirement for various applications. Whether you want the output as A1, B1, C1... or simply A, B, C..., PHP offers multiple ways …
Solving TCPDF Memory Issue: Allowed Memory Size Exhausted
When generating PDFs with TCPDF, handling large datasets can lead to errors such as: Fatal error: Maximum execution time of 30 seconds exceeded Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate …
How to Open PDF File in Another Tab Using CodeIgniter
Opening a PDF file in a new browser tab can enhance user experience, especially when dealing with reports or documentation. CodeIgniter, a popular PHP framework, makes this process straightforward. Here's a step-by-step guide to help …
How to Paginate Data With PHP: A Comprehensive Guide
Pagination is a critical technique when dealing with large datasets in web applications. It allows you to efficiently display data by breaking it into smaller, more manageable chunks. This guide will walk you through the …
What do you mean by the csrf_token?
The csrf_token is used for protection against Cross-Site Request Forgeries. This kind of attack takes place when a malicious website consists of a link, some JavaScript, or a form whose aim is to perform some …
What is an Interpreted language?
Interpreted language An Interpreted language executes its statements line by line. Languages such as Python, Javascript, R, PHP, and Ruby is a prime examples of Interpreted languages. Programs written in an interpreted language runs directly from …
How to start array index from 1 in PHP
PHP | Start array index from 1 To change the array index start from 1 instead of 0 can be done using array_unshift() and unset() function. array_unshift() Function The array_unshift() function inserts new elements to …
Web Scraping with PHP
PHP | Web Scraping Web scraping is used to get specific data from another website when there is no API available for it. There are many techniques for web scraping. You can read more about this …
ChartJS | How to draw Bar chart from server data using MySQL, Ajax and PHP
Chart.JS | Draw Bar chart from server data using MySQL, Ajax, and PHP This example shows how to draw a bar chart with data from the database server. FILE STRUCTURE At the end of this …
A non-numeric value encountered in PHP
PHP | Warning: A non-numeric value encountered This error occurs when you are trying to do a mathematical operation on an integer with a nun-numeric value or a string. Info: New E_WARNING and E_NOTICE errors …
Comments in PHP
PHP | Comments A comment in PHP code is a line that is not executed as a part of the program. It's only read by someone who is looking at the code. By reading the comments …
Is PHP a case sensitive language?
PHP | Case Sensitive In PHP, keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are not case-sensitive but all variable names are case-sensitive. If you defined function name in lowercase, …
PHP Syntax and Tags
PHP | Syntax, and Tags PHP introduces a list of Tags to code PHP. PHP tags allow the PHP parsing engine to get in and get out from the PHP block. A PHP script can …
What will be the value of $x when given statement execute?
PHP | Statement $x = 3 + "15%" + "$25"? The correct answer is 18. Here’s why: PHP is a loosely typed language, therefore it does automatic type conversion based on the context in which …
What are the errors in below code? What will be output and how can you fix it?
PHP | Array error fix | array_merge() The output will be as follows: array(2) { [0]=> int(1) [1]=> int(2) } NULL NULL It will also generate two warning messages as follows: Warning: array_merge(): Argument #2 …