<< < 3 4 5 6 7 8 9 10 > >>   Sort: Rank

Understanding PHP Arrays and Their Basic Operations
Where to find tutorials in Understanding PHP Arrays and Their Basic Operations? A collection of tutorials to answer many frequently asked questions on basic understanding of PHP arrays. Clear answers are provided with tutorial exercises on declaring and creating arrays, assigning and retrieving arra...
2016-10-15, 1672🔥, 0💬

Testing If a Variable Is an Array in PHP
How To Test If a Variable Is an Array in PHP? Testing if a variable is an array is easy. Just use the is_array() function. Here is a PHP script on how to use is_array(): &lt;?php $var = array(0,0,7); print("Test 1: ". is_array($var)."\n"); $var = array(); print("Test 2: ". is_array($var)."\n"); ...
2016-10-15, 1659🔥, 0💬

Creating an Array in PHP
How To Create an Array in PHP? You can create an array using the array() constructor. When calling array(), you can also initialize the array with pairs of keys and values. Here is a PHP script on how to use array(): &lt;?php print("Empty array:\n"); $emptyArray = array(); print_r($emptyArray); ...
2016-10-15, 1607🔥, 0💬

What Is an Array in PHP
What Is an Array in PHP? An array in PHP is really an ordered map of pairs of keys and values. Comparing with Perl, an array in PHP is not like a normal array in Perl. An array in PHP is like an associate array in Perl. But an array in PHP can work like a normal array in Perl. Comparing with Java, a...
2016-10-15, 1561🔥, 0💬

Retrieving Values out of an Array in PHP
How To Retrieve Values out of an Array in PHP? You can retrieve values out of arrays using the array element expression $array[$key]. Here is a PHP example script: &lt;?php $languages = array(); $languages["Zero"] = "PHP"; $languages["One"] = "Perl"; $languages["Two"] = "Java"; print("Array with...
2016-10-15, 1372🔥, 0💬

Moving Uploaded Files to Permanent Directory in PHP
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary directory with temporary file names. You must move uploaded files to a permanent directory, if you want to keep them permanently. PHP offers the move_uploaded_file() to help you moving uploaded files. ...
2016-10-14, 4337🔥, 0💬

Filtering Out Empty Files in PHP
Why Do You Need to Filter Out Empty Files in PHP? When you are processing uploaded files, you need to check for empty files, because they could be resulted from a bad upload process but the PHP engine could still give no error. For example, if a user typed a bad file name in the upload field and sub...
2016-10-14, 2135🔥, 0💬

Detecting File Uploading Errors in PHP
How To Detect File Uploading Errors in PHP? If there was a problem for a file upload request specified by the &lt;INPUT TYPE=FILE NAME=fieldName...&gt; tag, an error code will be available in $_FILES[$fieldName]['error']. Possible error code values are: UPLOAD_ERR_OK (0) - There is no error,...
2016-10-14, 1452🔥, 0💬

Creating a Database Table to Store Files in PHP
How To Create a Table To Store Files in PHP? If you using MySQL database and want to store files in database, you need to create BLOB columns, which can holds up to 65,535 characters. Here is a sample script that creates a table with a BLOB column to be used to store uploaded files: &lt;?php $co...
2016-10-14, 2162🔥, 0💬

Technical Specifications for File Upload in PHP
How To Get the Technical Specifications for File Upload in PHP? File upload technical specifications is provided in "Form-based File Upload in HTML - RFC 1867". You can get a copy from http://www.ietf.org/rfc/rfc186 7.txt.    ⇒ PHP Tutorials ⇐ Configuration Settings for File Upload in PHP ⇑ Upload...
2016-10-14, 1533🔥, 0💬

Configuration Settings for File Upload in PHP
What Are the File Upload Settings in Configuration File in PHP? There are several settings in the PHP configuration file related to file uploading: file_uploads = On/Off - Whether or not to allow HTTP file uploads. upload_tmp_dir = directory - The temporary directory used for storing files when doin...
2016-10-14, 1520🔥, 0💬

"new line" Character in Single-Quoted Strings in PHP
Can You Specify the "new line" Character in Single-Quoted Strings? You can not specify the "new line" character in a single-quoted string. If you don't believe, try this script: &lt;?php echo '\n will not work in single quoted strings.'; ?&gt; This script will print: \n will not work in sing...
2016-10-13, 2943🔥, 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, 2044🔥, 0💬

Running a PHP Script
How To Run a PHP Script? A standard alone PHP script can be executed directly with the PHP Command Line Interface (CLI). Write the following script in a file called hello.php: &lt;?php echo "Hello world!"; ?&gt; This script can be executed by CLI interface like this: \php\php hello.php You s...
2016-10-13, 2030🔥, 0💬

Installing PHP for Windows
How To Download and Install PHP for Windows? The best way to download and install PHP on Windows systems is to: Go to http://www.php.net, which is the official Web site for PHP. Download PHP binary version for Windows in ZIP format. Unzip the downloaded file into a directory. You are done. No need t...
2016-10-13, 1966🔥, 0💬

Understanding PHP String Literals and Operations
Where to find tutorials for PHP String Literals and Operations? A collection of tutorials on PHP string literals, operations and conversion. Clear explanations and tutorial exercises are provided on single-quoted strings, double-quoted strings, string elements, concatenation, converting values to st...
2016-10-13, 1816🔥, 0💬

PHP Configuration Setting File
Where Are PHP Configuration Settings Stored? PHP stores configuration settings in a file called php.ini in PHP home directory. You can open it with any text editor to your settings.     ⇒ Running a PHP Script ⇐ Verifying PHP Installation ⇑ Downloading and Installing PHP ⇑⇑ PHP Tutorials
2016-10-13, 1726🔥, 0💬

Verifying PHP Installation
How To Verify Your PHP Installation? PHP provides two execution interfaces: Command Line Interface (CLI) and Common Gateway Interface (CGI). If PHP is installed in the \php directory on your system, you can try this to check your installation: Run "\php\php -v" command to check the Command Line Inte...
2016-10-13, 1718🔥, 0💬

Special Characters in Double-Quoted Strings in PHP
What Are the Special Characters You Need to Escape in Double-Quoted Stings? There are two special characters you need to escape in a double-quote string: the double quote (") and the back slash (\). Here is a PHP script example of double-quoted strings: &lt;?php echo "Hello world!"; echo "Tom sa...
2016-10-13, 1636🔥, 0💬

Escape Sequences in Single-Quoted Strings in PHP
How Many Escape Sequences Are Recognized in Single-Quoted Strings? There are two special characters you need to escape in a single-quote string: the single quote (') and the back slash (\). Here is a PHP script example of single-quoted strings: &lt;?php echo 'Hello world!'; echo 'It\'s Friday!';...
2016-10-13, 1537🔥, 0💬

Accessing a Specific Character in String in PHP
How To Access a Specific Character in a String? Any character in a string can be accessed by a special string element expression: $string{index} - The index is the position of the character counted from left and starting from 0. Here is a PHP script example: &lt;?php $string = 'It\'s Friday!'; e...
2016-10-13, 2719🔥, 0💬

Ways to Remove Leading and Trailing White Spaces in PHP
How Many ways to Remove Leading and Trailing White Spaces? There are 4 PHP functions you can use remove white space characters from the beginning and/or the end of a string: trim() - Remove white space characters from the beginning and the end of a string. ltrim() - Remove white space characters fro...
2016-10-13, 2635🔥, 0💬

Removing Leading and Trailing Spaces in PHP
How To Remove Leading and Trailing Spaces from User Input Values? If you are taking input values from users with a Web form, users may enter extra spaces at the beginning and/or the end of the input values. You should always use the trim() function to remove those extra spaces as shown in this PHP s...
2016-10-13, 2372🔥, 0💬

Counting the Number of Characters in PHP
How To Count the Number of Characters in a String? You can use the "strlen()" function to count the number of characters in a string. Here is a PHP script example of strlen(): &lt;?php print(strlen('It\'s Friday!')); ?&gt; This script will print: 12     ⇒ Ways to Remove Leading and Trailing...
2016-10-13, 2020🔥, 0💬

<< < 3 4 5 6 7 8 9 10 > >>   Sort: Rank