<< < 49 50 51 52 53 54 55 56 57 58 59 > >>   Sort: Rank

HTML Versions and Variations
What are versions and variations of the HTML standard? HTML was developed by Tim Berners-Lee in 1980. HTML Inventor: Tim Berners-Lee Since then, a number of versions and variations of the HTML standard were published: HTML 5.1 was published as a W3C Recommendation on November 1, 2016. HTML5 was publ...
2017-02-20, 1464🔥, 0💬

Introduction of HTML
Where to find tutorials in understanding what is HTML? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team in understanding what is HTML. Clear answers are provided for frequently asked questions on what is HTML, HTML5, XHTML, Web, HTTP, XML, URL, URI...
2017-02-20, 1448🔥, 0💬

HTML Document Example
What Does an HTML document look like? An HTML document is a normal text file with predefined tags mixed with the text contents of the document. Tags are enclosed in pairs of angle brackets: "&lt;" and "&gt;". Below is how a simple HTML document looks like if you open it in a text editor: &am...
2017-02-20, 1417🔥, 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, 2335🔥, 1💬

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

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, 10403🔥, 0💬

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, 2565🔥, 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, 2128🔥, 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, 2079🔥, 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, 1608🔥, 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, 2927🔥, 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, 2250🔥, 0💬

Counting the Number of Values in an Array in PHP
How To Get the Total Number of Values in an Array in PHP? You can get the total number of values in an array by using the count() function. Here is a PHP example script: &lt;?php $array = array("PHP", "Perl", "Java"); print_r("Size 1: ".count($array)."\n"); $array = array(); print_r("Size 2: ".c...
2017-01-29, 1844🔥, 0💬

Order of Array Values in PHP
How the Values Are Ordered in an Array in PHP? PHP says that an array is an ordered map. But how the values are ordered in an array? The answer is simple. Values are stored in the same order as they are inserted like a queue. If you want to reorder them differently, you need to use a sort function. ...
2017-01-29, 1742🔥, 0💬

Verifying If a Key Exists in an Array in PHP
How Do You Know If a Key Is Defined in an Array in PHP? There are two functions can be used to test if a key is defined in an array or not: array_key_exists($key, $array) - Returns true if the $key is defined in $array. isset($array[$key]) - Returns true if the $key is defined in $array. Here is a P...
2017-01-29, 1528🔥, 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, 1944🔥, 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, 1825🔥, 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, 1776🔥, 0💬

Sorting an Array by Keys in PHP
How To Sort an Array by Keys in PHP? Sorting an array by keys can be done by using the ksort() function. It will re-order all pairs of keys and values based on the alphanumeric order of the keys. Here is a PHP script on how to use ksort(): &lt;?php $mixed = array(); $mixed["Zero"] = "PHP"; $mixe...
2017-01-21, 1762🔥, 0💬

Retrieving All Keys from an Array in PHP
How To Get All the Keys Out of an Array in PHP? Function array_keys() returns a new array that contains all the keys of a given array. Here is a PHP script on how to use array_keys(): &lt;?php $mixed = array(); $mixed["Zero"] = "PHP"; $mixed[1] = "Perl"; $mixed["Two"] = "Java"; $mixed["3"] = "C+...
2017-01-21, 1594🔥, 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, 4297🔥, 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, 2137🔥, 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, 2126🔥, 0💬

Randomly Retrieving Array Values in PHP
How To Randomly Retrieve a Value from an Array in PHP? If you have a list of favorite greeting messages, and want to randomly select one of them to be used in an email, you can use the array_rand() function. Here is a PHP example script: &lt;?php $array = array("Hello!", "Hi!", "Allo!", "Hallo!"...
2017-01-11, 1826🔥, 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, 1782🔥, 0💬

<< < 49 50 51 52 53 54 55 56 57 58 59 > >>   Sort: Rank