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

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

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

Joining Array Values into a Single String in PHP
How To Join Multiple Strings Stored in an Array into a Single String in PHP? If you multiple strings stored in an array, you can join them together into a single string with a given delimiter by using the implode() function. Here is a PHP script on how to use implode(): &lt;?php $date = array('0...
2017-01-05, 360👍, 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, 360👍, 0💬

Passing Variables by References in PHP
How To Pass Variables By References? in PHP? You can pass a variable by reference to a function by taking the reference of the original variable, and passing that reference as the calling argument. Here is a PHP script on how to use pass variables by references: &lt;?php function swap($a, $b) { ...
2016-12-24, 360👍, 0💬

Function with Undefined Number of Arguments in PHP
How To Define a Function with Any Number of Arguments? in PHP? If you want to define a function with any number of arguments, you need to: Declare the function with no argument. Call func_num_args() in the function to get the number of the arguments. Call func_get_args() in the function to get all t...
2016-12-04, 360👍, 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, 360👍, 0💬

Downloading and Installing PHP
Where to find tutorials in downloading and installing PHP binary version for Windows system. Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team in downloading and installing PHP binary version for Windows system. Installing PHP for Windows Verifying ...
2016-10-13, 360👍, 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, 359👍, 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, 358👍, 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, 358👍, 0💬

Uploading Files to Web Servers in PHP
Where to find tutorials on how to upload files to Web servers in PHP? A collection of tutorials to answer many frequently asked questions on how to upload files to Web servers in PHP. Clear explanations and tutorial exercises are provided on creating file upload HTML tags, setting encoding type on H...
2016-10-17, 357👍, 0💬

Passing Arrays by Values to Functions in PHP
How Arrays Are Passed Through Arguments? in PHP? Like a normal variable, an array is passed through an argument by value, not by reference. That means when an array is passed as an argument, a copy of the array will be passed into the function. Modifying that copy inside the function will not impact...
2016-12-18, 354👍, 0💬

Supporting Hidden Form Fields in PHP
How To Support Hidden Form Fields in PHP? Hidden fields are special fields in a form that are not shown on the Web page. But when the form is submitted, values specified in the hidden fields are also submitted to the Web server. A hidden field can be specified with the &lt;INPUT TYPE=HIDDEN ...&...
2016-11-08, 353👍, 0💬

Creating a Table in PHP
How To Create a Table in PHP? If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "CREATE TABLE fyi_links (" . " id INTEGER NOT NULL" . ", url VARCHAR(80) NOT NULL" . ", notes VARCHAR(1024)...
2016-10-20, 353👍, 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, 352👍, 0💬

Interview Questions - HTML Forms and Input Fields
Where to find Interview Questions on HTML Forms and Input Fields? Here are some interview questions on HTML Forms and Input Fields: What is a form? What elements can you use to submit a form? When a form is submitted, where the data is delivered to? What is a hidden input field? How to create a grou...
2017-02-28, 352👍, 0💬

Retrieving the Original Query String in PHP
How To Retrieve the Original Query String in PHP? If you have coded some values in the URL without using the standard form GET format, you need to retrieve those values in the original query string in $_SERVER['QUERY_STRING']. The script below is an enhanced version of processing_forms.php which pri...
2016-11-05, 351👍, 0💬

Setting session.gc_divisor Properly in PHP
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency of when the session garbage collection process will be executed. You should set this value based on the income request traffic. Here are some suggestions: # Set it to 10, if traffic is less than 10,00...
2016-10-24, 351👍, 0💬

Returning a Value from a Function in PHP
How To Return a Value Back to the Function Caller? in PHP? You can return a value to the function caller by using the "return $value" statement. Execution control will be transferred to the caller immediately after the return statement. If there are other statements in the function after the return ...
2016-12-24, 350👍, 0💬

Attributes of an HTML 'img' Element
What Are the Attributes of an "img" Element? There are 4 commonly used attributes for an "img" element: "src" - Required attribute. Used to specify the URL of the image file. "alt" - Required attribute. Used to specify the name of the image. "width" - Optional attribute. Used to specify the width of...
2017-03-27, 348👍, 0💬

Protecting Special Characters in Query String in PHP
How To Protect Special Characters in Query String in PHP? If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode(): &lt;?php print("&lt;html&gt;"); p...
2016-11-05, 348👍, 0💬

Reading a Text File to an Array in PHP
How To Read a Text File into an Array in PHP? If you have a text file with multiple lines, and you want to read those lines into an array, you can use the file() function. It opens the specified file, reads all the lines, puts each line as a value in an array, and returns the array to you. Here is a...
2016-12-04, 347👍, 0💬

'rowspan' - Merging Cells HTML Table Columns
How To Merge Cells in a Column? If you want to merge multiple cells vertically in a row, you need to use the "rowspan" attribute of in a "td" element. "rowspan" allows you to specify how many cells you want to merge into this cell vertically. Below is a tutorial example of merging cells vertically: ...
2017-04-22, 346👍, 0💬

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