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

Local Variables in a Function in PHP
What Is the Scope of a Variable Defined in a Function? in PHP? The scope of a local variable defined in a function is limited with that function. Once the function is ended, its local variables are also removed. So you can not access any local variable outside its defining function. Here is a PHP sc...
2016-12-08, 335👍, 0💬

$_GET, $_POST and $_REQUEST in PHP
Where Is the Submitted Form Data Stored in PHP? When a user submit a form on your Web server, user entered data will be transferred to the PHP engine, which will make the submitted data available to your PHP script for processing in pre-defined arrays: $_GET - An associate array that store form data...
2016-11-15, 335👍, 0💬

'frame' - Controlling HTML Table Borders
How To Turn On Some Parts of Table Outer Borders? If you don't want to turn all 4 edges of outer borders in a table, you need to use the "frame" attribute, which offer the following options: &lt;table border="1" frame="border"&gt; - Turns on all 4 edges. &lt;table border="1" frame="box"&...
2017-05-13, 334👍, 0💬

URL Starts with Path or File name
What Happens If a URL Starts with Path or File name? If a URL starts with a path name, the browser will borrow the protocol name, the host name, and the port number from the URL of the current document to make up the missing parts. For example, if the following URL is used in this document you are v...
2017-07-07, 333👍, 0💬

Accessing Global Variables inside a Function in PHP
How To Access a Global Variable inside a Function? in PHP? By default, global variables are not accessible inside a function. However, you can make them accessible by declare them as "global" inside a function. Here is a PHP script on declaring "global" variables: &lt;?php ?&gt; $intRate = 5...
2016-12-08, 332👍, 0💬

Opening Standard Output as a File Handle in PHP
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a file handle yourself, you can use the fopen("php://stdout") function. It creates a special file handle linking to the standard output, and returns the file handle. Once the standard output is opened to ...
2016-11-24, 332👍, 0💬

Looping through an Array in PHP
How to Loop through an Array in PHP? The best way to loop through an array is to use the "foreach" statement. There are two forms of "foreach" statements: foreach ($array as $value) {} - This gives you only one temporary variable to hold the current value in the array. foreach ($array as $key=&g...
2017-02-03, 331👍, 0💬

Passing Arrays to Function in PHP
Can You Pass an Array into a Function? in PHP? You can pass an array into a function in the same as a normal variable. No special syntax needed. Here is a PHP script on how to pass an array to a function: &lt;?php function average($array) { $sum = array_sum($array); $count = count($array); retur...
2016-12-18, 331👍, 0💬

Defining a HTML Bookmark
How To Define a Bookmark? A bookmark is a named reference point in an HTML document. If a bookmark can be included in the URL that represents this document, the browser will automatically move the display window to the reference point as soon as the document is open. If you want to define a bookmark...
2017-07-15, 330👍, 0💬

Sorting an Array by Values in PHP
How To Sort an Array by Values in PHP? Sorting an array by values is doable by using the sort() function. It will re-order all pairs of keys and values based on the alphanumeric order of the values. Then it will replace all keys with integer keys sequentially starting with 0. So using sort() on arra...
2017-01-21, 330👍, 0💬

Getting Minimum/Maximum Value of an Array in PHP
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximum value of an array, you can use the min() or max() function. Here is a PHP script on how to use min() and max(): &lt;?php $array = array(5, 7, 6, 2, 1, 3, 4, 2); print("Minimum number: ".min($arr...
2016-12-28, 329👍, 0💬

Hyper Link Points to a ZIP File
What Happens If a Hyper Link Points to a ZIP File? If you want to build a hyper link to allow visitors to access a ZIP file by clicking a hyper link, you can put the URL of the ZIP file directly in the "href" attribute of the hyper link. If a visitor clicks the link, the browser will fetch the PDF f...
2017-07-03, 328👍, 0💬

Function Returns Data by Value in PHP
How Values Are Returned from Functions? in PHP? If a value is returned from a function, it is returned by value, not by reference. That means that a copy of the value is return. Here is a PHP script on how values are returned from a function: &lt;?php $favor = "vbulletin"; function getFavor() { ...
2016-12-08, 327👍, 0💬

Invoking a User Function in PHP
How To Invoke a User Function? in PHP? You can invoke a function by entering the function name followed by a pair of parentheses. If needed, function arguments can be specified as a list of expressions enclosed in parentheses. Here is a PHP script example on how to invoke a user function: &lt;?p...
2016-12-28, 326👍, 0💬

HTML Forms and Input Fields
Where to find tutorials of introduction to HTML Forms and Input Fields? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team in introduction to HTML Forms and Input Fields. Clear answers are provided with tutorial exercises on forms and input fields: f...
2017-04-22, 325👍, 0💬

HTML Anchor 'a' Tag/Element
What Is an Anchor "a" Tag/Element? An "a" element is an inline element that you can use to specify a hyper link in your HTML document. An "a" element can also be used to define a bookmark in your HTML document. Here are basic rules about "a" elements: "a" elements are inline elements. "a" elements c...
2017-07-15, 324👍, 0💬

Multiple Paragraphs in an HTML List Item
Can Multiple Paragraphs Be Included in a List Item? Yes. You can include multiple paragraphs in a single list item, because "li" is a flow type element, which can have block elements and inline elements. The tutorial example below shows you how a list item can have two paragraphs: &lt;?xml versi...
2017-05-29, 323👍, 0💬

Merging Two Arrays into a Single Array in PHP
How To Merge Values of Two Arrays into a Single Array in PHP? You can use the array_merge() function to merge two arrays into a single array. array_merge() appends all pairs of keys and values of the second array to the end of the first array. Here is a PHP script on how to use array_merge(): &l...
2017-01-11, 323👍, 0💬

Defining a User Function in PHP
How To Define a User Function? in PHP? You can define a user function anywhere in a PHP script using the function statement like this: "function name() {...}". Here is a PHP script example on how to define a user function: &lt;?php function msg() { print("Hello world!\n"); } msg(); ?&gt; Thi...
2016-12-28, 322👍, 0💬

HTML Lists and List Items
Where to find tutorials of introduction to HTML Lists and List Items? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team in introduction to HTML Lists and List Items. Clear answers are provided with tutorial examples on list elements for ordered list...
2017-06-16, 320👍, 0💬

Default Protocol and Port Number of a URL
What Happens If Protocol or Port Number Is Missing in a URL? From a syntax point of view, all URL parts are optional. If some parts are not included in a URL, the browser and the hosting computer will provide default values. Here are some rules about the protocol name, host name, and port number: 1....
2017-07-07, 319👍, 0💬

Splitting a String into an Array in PHP
How To Split a String into an Array of Substring in PHP? There are two functions you can use to split a string into an Array of Substring: explode(substring, string) - Splitting a string based on a substring. Faster than split(). split(pattern, string) - Splitting a string based on a regular express...
2016-12-28, 319👍, 0💬

What Is a Persistent Cookie in PHP
What Is a Persistent Cookie in PHP? A persistent cookie is a cookie which is stored in a cookie file permanently on the browser's computer. By default, cookies are created as temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased. Yo...
2016-11-04, 319👍, 0💬

HTML 'form' Element Attributes
What Are the Attributes of a "form" Element? There are 3 commonly used attributes for a "form" element: "action" - Required attribute. Used to specify the URL of the form processing program. "method" - Optional attribute. Used to specify the form submission method: "get" or "post". method="get" is t...
2017-04-19, 318👍, 0💬

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