< 1 2 3 4 5 6 7 > >>   Sort: Date

Index of Array Values in PHP
How Values in Arrays Are Indexed in PHP? Values in an array are all indexed their corresponding keys. Because we can use either an integer or a string as a key in an array, we can divide arrays into 3 categories: Numerical Array - All keys are sequential integers. Associative Array - All keys are st...
2017-02-03, 914👍, 0💬

EPUB 2.0 Metadata - dc:date Element
What is EPUB 2.0 Metadata "dc:date" Element? EPUB 2.0 Metadata "dc:date" is an optional metadata element to specify the publishing date of the EPUB 2.0 book. EPUB 2.0.1 specification adds one attribute, "event", to the "Dublin Core Metadata Element Set" standard on this "dc:date" element: opf:event ...
2019-01-26, 912👍, 0💬

Selecting an Existing Database in PHP
How To Select an Exiting Database in PHP? The first thing after you have created a connection object to the MySQL server is to select the database where your tables are locate, by using the mysql_select_db() function. If your MySQL server is offered by your Web hosting company, they will assign a da...
2016-10-20, 912👍, 0💬

Creating a Directory in PHP
How To Create a Directory in PHP? You can use the mkdir() function to create a directory. Here is a PHP script example on how to use mkdir(): &lt;?php if (file_exists("/temp/download") ){ print("Directory already exists.\n"); } else { mkdir("/temp/download"); print("Directory created.\n"); } ?&a...
2016-11-24, 905👍, 0💬

Reading and Writing Files in PHP
Where to find tutorials on how to Read and Write Files in PHP? A collection of tutorials to answer many frequently asked questions how to Read and Write Files in PHP. Topics included in this collection are: Reading a Text File to an Array in PHP Reading the Entire File to a String in PHP Opening a f...
2016-12-04, 901👍, 0💬

Quoting Date and Time Values in PHP
How To Quote Date and Time Values in SQL Statements in PHP? If you want to provide date and time values in a SQL statement, you should write them in the format of "yyyy-mm-dd hh:mm:ss", and quoted with single quotes ('). The tutorial exercise below shows you two INSERT statements. The first one uses...
2016-10-19, 900👍, 0💬

EPUB 2.0 Metadata - dc:creator and dc:contributor Elements
What is EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator" and "dc:contributor" are optional metadata elements to specify authors and contributors of the EPUB 2.0 book. EPUB 2.0.1 specification adds two attributes, "role" and "file-as", to the "Dublin Core M...
2019-01-26, 899👍, 0💬

Looping through an Array without "foreach" in PHP
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to allow you loop through an array without using the "foreach" statement: reset($array) - Moves the array internal pointer to the first value of the array and returns that value. end($array) - Moves the a...
2017-01-05, 893👍, 0💬

HTML 'em' Tag/Element
What Is an HTML "em" Tag/Element? An "em" element is an inline element that you can use to specify text with a normal emphasis. Here are basic rules about "em" elements: "em" elements are inline elements. "em" elements can not be used at block level. Contents of "em" elements will be displayed in it...
2017-04-28, 890👍, 0💬

Specifying Argument Default Values in PHP
How To Specify Argument Default Values? in PHP? If you want to allow the caller to skip an argument when calling a function, you can define the argument with a default value when defining the function. Adding a default value to an argument can be done like this "function name($arg=expression){}. Her...
2016-12-04, 888👍, 0💬

Filtering Out Empty Files in PHP
Why Do You Need to Filter Out Empty Files in PHP? When you are processing uploaded files, you need to check for empty files, because they could be resulted from a bad upload process but the PHP engine could still give no error. For example, if a user typed a bad file name in the upload field and sub...
2016-10-14, 888👍, 0💬

PHP Built-in Functions for Arrays
Where to find tutorials on how to use PHP built-in functions to manage arrays? A collection of tutorials to answer many frequently asked questions on how to PHP functions to manage arrays. Clear answers are provided with tutorial exercises on searching keys and values, sorting arrays, merging two ar...
2017-01-29, 878👍, 0💬

Supporting a Multiple-Page Form in PHP
How To Support Multiple-Page Forms in PHP? If you have a long form with a lots of fields, you may want to divide the fields into multiple groups and present multiple pages with one group of fields on one page. This makes the a long form more user-friendly. However, this requires you to write good sc...
2016-11-05, 877👍, 0💬

Introduction of EPUB 2.0.1 Specification
Where to find tutorials on introduction of EPUB 2.0.1 Specification? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on introduction of EPUB 2.0.1 Specification. What Is EPUB 2.0.1 Specification Minimum Requirement of EPUB 2.0.1 File Hello-2.0.epu...
2019-01-12, 875👍, 0💬

Generating and Processing Form with the Same Script in PHP
How To Generate and Process a Form with the Same Script in PHP? In previous exercises, a Web form is generated by one script, and processed by another script. But you could write a single script to do both. You just need to remember to: Use same script name as the form generation script in the "acti...
2016-11-08, 874👍, 0💬

EPUB 2.0 Metadata in Calibre Book Library
How to view EPUB 2.0 metadata in Calibre book Library? You can follow this tutorial to view EPUB 2.0 metadata in Calibre book library. 1. Click Row-Your-Boat-2.0.epub to download this sample EPUB 2.0 book. 2. Unzip and open package.opf. You see the following metadata elements: &lt;package xmlns=...
2019-01-12, 872👍, 0💬

Creating a Database Table to Store Files in PHP
How To Create a Table To Store Files in PHP? If you using MySQL database and want to store files in database, you need to create BLOB columns, which can holds up to 65,535 characters. Here is a sample script that creates a table with a BLOB column to be used to store uploaded files: &lt;?php $co...
2016-10-14, 871👍, 0💬

'align' - Horizontal Alignment HTML Tables
How To Control Horizontal Alignment in Table Cells? By default, text in all table cells are aligned to the left horizontally. If you want to control horizontal alignment yourself, you need to use the "align" attribute in a "tr" element or a "td" element: &lt;tr align="left|center|right"& gt;...
2017-05-05, 867👍, 0💬

Issue with "while ($c=fgetc($f))" Loop in PHP
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to loop through each character in a file, the loop may end in the middle of the file when there is a "0" character, because PHP treats "0" as Boolean false. To properly loop to the end of the file, you sho...
2016-11-27, 867👍, 0💬

Using an Array as a Stack in PHP
How To Use an Array as a Stack in PHP? A stack is a simple data structure that manages data elements following the first-in-last-out rule. You use the following two functions together to use an array as a stack: array_push($array, $value) - Pushes a new value to the end of an array. The value will b...
2017-01-11, 858👍, 0💬

EPUB 2.0 Metadata - dc:description Element
What is EPUB 2.0 Metadata "dc:description" Element? EPUB 2.0 Metadata "dc:description" is an optional metadata element to specify a long description of the EPUB 2.0 book. Here is a good example of a "dc:description" metadata element &lt;dc:description&gt; "Row,Row, Row Your Boat" is a popula...
2019-01-26, 850👍, 0💬

EPUB 2.0 Metadata - dc:subject Element
What is EPUB 2.0 Metadata "dc:subject" Element? EPUB 2.0 Metadata "dc:subject" is an optional metadata element to specify the subject category of the EPUB 2.0 book. When using "dc:subject" metadata element, you should follow an industry standard like: BISAC (Book Industry Standards And Communication...
2019-01-26, 850👍, 0💬

Running a PHP Script
How To Run a PHP Script? A standard alone PHP script can be executed directly with the PHP Command Line Interface (CLI). Write the following script in a file called hello.php: &lt;?php echo "Hello world!"; ?&gt; This script can be executed by CLI interface like this: \php\php hello.php You s...
2016-10-13, 847👍, 0💬

Inserting Rows Based on SELECT Statement in PHP
How To Insert Rows Based on SELECT Statements in PHP? If want to insert rows into a table based on data rows from other tables, you can use a sub-query inside the INSERT statement as shown in the following script example: &lt;?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_links" . ...
2016-10-20, 832👍, 0💬

< 1 2 3 4 5 6 7 > >>   Sort: Date