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

Reading the Entire File to a String in PHP
How To Read the Entire File into a Single String in PHP? If you have a file, and you want to read the entire file into a single string, you can use the file_get_contents() function. It opens the specified file, reads all characters in the file, and returns them in a single string. Here is a PHP scri...
2016-12-04, 284👍, 0💬

HTML Tutorials
Where to find tutorials on HTML language? I want to know how to learn HTML. Here is a large collection of tutorials to answer many frequently asked questions compiled by FYIcenter.com team about HTML language: Introduction of HTML What Is HTML? HTML Versions and Variations HTML Document Example XHTM...
2017-02-20, 282👍, 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, 281👍, 0💬

Reading Directory Entries in PHP
How To Read a Directory One Entry at a Time in PHP? If you want to read a directory one entry at a time, you can use opendir() to open the specified directory to create a directory handle, then use readdir() to read the directory contents through the directory handle one entry at a time. readdir() r...
2016-11-20, 281👍, 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, 279👍, 0💬

Creating a Web Form in PHP
How To Create a Web Form in PHP? If you take input data from visitors on your Web site, you can create a Web form with input fields to allow visitors to fill in data and submit the data to your server for processing. A Web form can be created with the <FORM> tag with some input tags. The <F...
2016-11-17, 279👍, 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 <INPUT TYPE=HIDDEN ...> ...
2016-11-08, 279👍, 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(): <?p...
2017-01-11, 278👍, 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: <?php function swap($a, $b) { $t =...
2016-12-24, 278👍, 0💬

Returning an Array from a Function in PHP
How To Return an Array from a Function? in PHP? You can return an array variable like a normal variable using the return statement. No special syntax needed. Here is a PHP script on how to return an array from a function: <?php function powerBall() { $array = array(rand(1,55), rand(1,55), rand(1,...
2016-12-18, 278👍, 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, 278👍, 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, 277👍, 0💬

Expected Input Field Not Submitted in PHP
What Happens If an Expected Input Field Was Not Submitted in PHP? Obviously, if an expected input field was not submitted, there will be no entry in the $_REQUEST array for that field. You may get an execution error, if you are not checking the existence of the expected entries in $_REQUEST. For exa...
2016-11-15, 277👍, 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, 277👍, 0💬

Removing a Cookie in PHP
How To Remove a Cookie in PHP? Once a cookie is sent from the server to the browser, there is no direct way for the server to ask the browser to remove the cookie. But you can use the setcookie() function to send the same cookie to browser with a negative expiration time, which will cause the browse...
2016-11-03, 277👍, 0💬

Specifying Input Values for Checkboxes in PHP
How To Specify Input Values for Checkboxes in PHP? Checkboxes can be used in a form for two situations: As a single switch - One <INPUT TYPE=CHECKBOX ...> tag, with no input value specified. When submitted with button pushed down, you will receive a value of "on". When submitted with button no...
2016-11-13, 275👍, 0💬

Interview Questions - HTML Hyper Links and Images
Where to find Interview Questions on HTML Hyper Links and Images? Here are some interview questions on HTML Hyper Links and Images: What is a hyper link? What is a URL? How to included an image in the middle of a sentence? How to place an image to the right side of a paragraph? What is an image map?...
2017-02-28, 274👍, 0💬

HTML 'img' Tag/Element
What Is an "img" Tag/Element? A "img" element is an inline element that you can use to define an inline image to be included in a XHTML document. Here are basic rules about an "img" element: "img" elements are inline elements. A "img" element must have empty content. A "img" element requires an attr...
2017-03-27, 273👍, 0💬

Copying a File in PHP
How To Copy a File in PHP? If you have a file and want to make a copy to create a new file, you can use the copy() function. Here is a PHP script example on how to use copy(): <?php unlink("/temp/myPing.exe"); copy("/windows/system32/ping.e xe","/temp/myPing.exe"); if (file_exists("/temp/myPing.e.. .
2016-11-20, 273👍, 0💬

Retrieving Submitted Form Data in PHP
How To Retrieve the Submitted Form Data in PHP? The best way to retrieve the form data submitted by your visitor is to use the $_REQUEST array. The keys in this array will be the field names defined in form. The values in this array will be the values entered by your visitor in the input fields. The...
2016-11-15, 273👍, 0💬

Saving Values in the Session in PHP
How To Save Values to the Current Session in PHP? When session is turned on, a session will be automatically created for you by the PHP engine. If you want to save any values to the session, you can use the pre-defined associative array called $_SESSION. The following PHP script shows you how to sav...
2016-10-26, 273👍, 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, 272👍, 0💬

Global Variables in Main Script in PHP
What Is the Scope of a Variable Defined outside a Function? in PHP? A variable defined outside any functions in main script body is called global variable. However, a global variable is not really accessible globally any in the script. The scope of global variable is limited to all statements outsid...
2016-12-08, 272👍, 0💬

Opening a file for Reading in PHP
How To Open a File for Reading in PHP? If you want to open a file and read its contents piece by piece, you can use the fopen($fileName, "r") function. It opens the specified file, and returns a file handle. The second argument "r" tells PHP to open the file for reading. Once the file is open, you c...
2016-12-02, 272👍, 0💬

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