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

Returning a Reference from a Function in PHP
How To Return a Reference from a Function? in PHP? To return a reference from a function, you need to: Add the reference operator "&amp;" when defining the function. Add the reference operator "&amp;" when invoking the function. Here is a PHP script on how to return a reference from a functi...
2016-12-08, 538👍, 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, 529👍, 0💬

Retrieving All Values from an Array in PHP
How To Get All the Values Out of an Array in PHP? Function array_values() returns a new array that contains all the values of a given array. Here is a PHP script on how to use array_values(): &lt;?php $mixed = array(); $mixed["Zero"] = "PHP"; $mixed[1] = "Perl"; $mixed["Two"] = "Java"; $mixed["3...
2017-01-21, 527👍, 0💬

'th' - Adding HTML Table Headers
How To Add Column Headers to a Table? If you want to add column headers to a table, you need to use "th" elements instead of "td" elements in the first row of the table. "th" elements are displayed in bold and centered by default. Below is a tutorial example of adding column headers to a table: &...
2017-05-05, 521👍, 0💬

Adding Values to an Array without Keys in PHP
Can You Add Values to an Array without Keys in PHP? Can You Add Values to an Array with a Key? The answer is yes and no. The answer is yes, because you can add values without specifying any keys. The answer is no, because PHP will add a default integer key for you if you are not specifying a key. PH...
2017-02-03, 516👍, 0💬

Writing a String to a File with a File Handle in PHP
How To Write a String to a File with a File Handle in PHP? If you have a file handle linked to a file opened for writing, and you want to write a string to the file, you can use the fwrite() function. It will write the string to the file where the file pointer is located, and moves the file pointer ...
2016-11-27, 516👍, 0💬

Uploading Files into Database in PHP
How To Upload Files into Database in PHP? To store uploaded files to MySQL database, you can use the normal SELECT statement as shown in the modified processing_uploaded_files.php listed below: &lt;?php $con = mysql_connect("localhost", "", ""); mysql_select_db("fyi"); $error = $_FILES['fyicente...
2017-02-20, 503👍, 1💬

💬 2017-02-20 Jonas: Thanks for the sample code!

'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, 496👍, 0💬

HTML http-equiv 'meta' Tag/Element
What Is an HTML http-equiv "meta" Tag/Element? a http-equiv "meta" element is a special "meta" element that provides information equivalent to HTTP headers. A http-equiv "meta" element must include the "http-equiv" attribute as, http-equiv="Content-Type". Here is some good examples: &lt;meta htt...
2017-06-23, 489👍, 0💬

Copying an Array in PHP
Can You Copy an Array in PHP? You can create a new array by copying an existing array using the assignment statement. Note that the new array is not a reference to the old array. If you want a reference variable pointing to the old array, you can use the reference operator "&amp;". Here is a PHP...
2017-02-03, 487👍, 0💬

Padding an Array with a Given Value in PHP
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value multiple times to the end or beginning of an array, you can use the array_pad($array, $new_size, $value) function. If the second argument, $new_size, is positive, it will pad to the end of the array. If ...
2017-01-05, 475👍, 0💬

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

What Is session_register() in PHP
What Is session_register() in PHP? session_register() is old function that registers global variables into the current session. You should stop using session_register() and use array $_SESSION to save values into the current session now.   ⇒Understanding and Using Sessions in PHP ⇒⇒PHP Tutorials
2016-10-22, 472👍, 0💬

'cellpadding' - Padding Spaces in HTML Table Cell
How To Control Padding Spaces within a Table Cell? Cell padding spaces are spaces between cell inner borders and cell content. By default, browsers give cell padding spaces of 1 pixel. If you want to control cell padding spaces within a table cell, you need to use the "cellpadding" attribute, which ...
2017-05-13, 471👍, 0💬

Copying Array Values to a List of Variables in PHP
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a list of variable, you can use the list() construct on the left side of an assignment operator. list() will only take values with integer keys starting from 0. Here is a PHP script on how to use list(...
2017-01-29, 446👍, 0💬

Creating HTML Table Borders
How To Create Table Borders? There are two sets of borders within a table: Outer Borders - Borders that around the outer edges of the table. Inner Borders - Borders between table cells. If you want to create table outer borders and inner borders, you can use the "border" attribute, which offers two ...
2017-05-13, 443👍, 0💬

'valign' - Vertical Alignment in HTML Table
How To Control Vertical Alignment? By default, text in all table cells are aligned to the top vertically. If you want to control vertical alignment yourself, you need to use the "valign" attribute in a "tr" element or a "td" element: &lt;tr valign="top|middle|bottom"& ;gt;- Set vertical align...
2017-05-05, 437👍, 0💬

JSON Tutorials
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how to use JSON. Here is a large collection of tutorials to answer many frequently asked questions compiled by FYIcenter.com team about JSON text string format: Introduction of JSON What Is JSON? JSON Tex...
2017-08-13, 436👍, 0💬

HTML Definition List 'dl' Tag/Element
What Is a "dl" Tag/Element? A "dl" element is block level element that can be used to define a definition list, where items are displayed with leading terms. Here are basic rules about "dl" elements: "dl" elements are block level elements. "dl" elements can not have text contents. An "dl" element mu...
2017-05-29, 436👍, 0💬

Data Types of Array Keys in PHP
What Types of Data Can Be Used as Array Keys in PHP? Two types of data can be used as array keys: string and integer. When a string is used as a key and the string represent an integer, PHP will convert the string into a integer and use it as the key. Here is a PHP script on different types of keys:...
2017-02-03, 416👍, 0💬

Joining Keys and Values into an Array in PHP
How To Join a List of Keys with a List of Values into an Array in PHP? If you have a list keys and a list of values stored separately in two arrays, you can join them into a single array using the array_combine() function. It will make the values of the first array to be the keys of the resulting ar...
2017-01-11, 411👍, 0💬

Creating an Array with a Sequence in PHP
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create an array with a sequence of integers or characters is to use the range() function. It returns an array with values starting with the first integer or character, and ending with the second integer or c...
2017-01-05, 410👍, 0💬

Finding a Given Value in an Array in PHP
How To Find a Specific Value in an Array in PHP? There are two functions can be used to test if a value is defined in an array or not: array_search($value, $array) - Returns the first key of the matching value in the array, if found. Otherwise, it returns false. in_array($value, $array) - Returns tr...
2017-01-21, 403👍, 0💬

HTML 'table' Element Attributes
What Are the Attributes of a "table" Element? A "table" element may have the following commonly used attributes: "summary" - Specifies a text string as the summary of the table. "width" - Specifies the width of the table. "border" - Specifies the border width. "frame" - Specifies how the outer borde...
2017-05-13, 401👍, 0💬

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