Programming
Tutorials
-

Create JSON Files In PHP
Format the data values using the function json_encode(), and generate the JSON file with the use of the following functions, fopen(), fwrite(), and fclose() in PHP. Requirements: PHP PHP JSON extension – added and enabled by default since PHP 5.2.0 How To Create JSON Files in PHP. The objective is to generate a JSON file,…
-

Differentiate bindParam From bindValue
The main difference between PDOStatement bindParam() and PDOStatement bindValue() is that when using the former, the variable is bound as a reference and will only be evaluated at the time that PDOStatement execute() is called. The value of the parameter can still be changed until the statement is executed, while whatever first set value will…
-

Use PHP PDOStatement bindValue
Use the PDO function PDOStatement bindValue() to bind a parameter to a specified variable name in PHP. Requirements: PHP PHP Data Objects PDO Drivers PDOStatement::bindValue How to bind a parameter to a variable using PDOStatement bindValue(). Make sure the connection to MySQL Database have already been successfully made. And assign the connection object to variable…
-

Use PHP PDOStatement bindParam
Bind a parameter to a specified variable name using the PDO function PDOStatement bindParam() in PHP. Prepare the statement using a named (:name) or question mark (?) placeholder in the SQL statement. Requirements: PHP PHP Data Objects PDO Drivers PDOStatement::bindParam How to bind a parameter to a variable using PDOStatement bindParam(). Make sure the connection…
-

Create PDFs In PHP With Header/Footer
Add header with logo and footer in creating PDF files in PHP using FPDF Library Class. Position the data to your desired area, choose a font and display directly on a browser, or save to a LOCAL directory, or even force a file download of the generated PDF file. Requirements: Composer PHP ^PHP 5.1 PHP…
-

Create PDFs in PHP using FPDF Library
Use Free PDF (FPDF) PHP class to easily generate pure PHP PDF files. Options include displaying the generated PDF file on the browser, or saving the created PDF file on a LOCAL directory, and another is forcing a download of the generated PDF file. Requirements: Composer PHP ^PHP 5.1 PHP Zlib PHP GD Step 1.…