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

What Are the Special Characters You Need to Escape in Double-Quoted Stings
What Are the Special Characters You Need to Escape in Double-Quoted Stings? - PHP Script Tips - Understanding String Literals and Operations 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 doub...
2007-04-20, 4717👍, 0💬

How Many Escape Sequences Are Recognized in Double-Quoted Strings
How Many Escape Sequences Are Recognized in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations There are 12 escape sequences you can use in double-quoted strings: \\ - Represents the back slash character. \" - Represents the double quote character. \$ - Represent...
2007-04-20, 4647👍, 0💬

How to Loop through an Array
How to Loop through an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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 ho...
2007-04-20, 5054👍, 0💬

Can You Copy an Array
Can You Copy an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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 arr...
2007-04-20, 4963👍, 0💬

How Many Ways to Include Variables in Double-Quoted Strings
How Many Ways to Include Variables in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations There are 3 formats to include variables in double-quoted strings: "part 1 $variable part 2" - This is the simplest format to include a variable in a string. The variable nam...
2007-04-20, 4636👍, 0💬

How To Include Variables in Double-Quoted Strings
How To Include Variables in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations Variables included in double-quoted strings will be interpolated. Their values will be concatenated into the enclosing strings. For example, two statements in the following PHP script ...
2007-04-20, 4626👍, 0💬

Can You Add Values to an Array without a Key
Can You Add Values to an Array without a Key? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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...
2007-04-20, 5019👍, 0💬

How Values in Arrays Are Indexed
How Values in Arrays Are Indexed? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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 ...
2007-04-20, 4687👍, 0💬

How Many Ways to Include Array Elements in Double-Quoted Strings
How Many Ways to Include Array Elements in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations There are 2 formats to include array elements in double-quoted strings: "part 1 $array[key] part 2" - This is called simple format. In this format, you can not specify t...
2007-04-20, 4534👍, 0💬

How To Access a Specific Character in a String
How To Access a Specific Character in a String? - PHP Script Tips - Understanding String Literals and Operations 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 i...
2007-04-20, 4735👍, 0💬

How To Retrieve Values out of an Array
How To Retrieve Values out of an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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"; $languag...
2007-04-20, 4605👍, 0💬

How To Assigning a New Character in a String
How To Assigning a New Character in a String? - PHP Script Tips - Understanding String Literals and Operations The string element expression, $string{index}, can also be used at the left side of an assignment statement. This allows you to assign a new character to any position in a string. Here is a...
2007-04-20, 4590👍, 0💬

How To Concatenate Two Strings Together
How To Concatenate Two Strings Together? - PHP Script Tips - Understanding String Literals and Operations You can use the string concatenation operator (.) to join two strings into one. Here is a PHP script example of string concatenation: &lt;?php echo 'Hello ' . "world!\n"; ?&gt; This scri...
2007-04-20, 4799👍, 0💬

How To Test If a Variable Is an Array
How To Test If a Variable Is an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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...
2007-04-20, 4855👍, 0💬

How To Create an Array
How To Create an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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...
2007-04-20, 4752👍, 0💬

How To Compare Two Strings with Comparison Operators
How To Compare Two Strings with Comparison Operators? - PHP Script Tips - Understanding String Literals and Operations PHP supports 3 string comparison operators, &lt;, ==, and &gt;, that generates Boolean values. Those operators use ASCII values of characters from both strings to determine ...
2007-04-20, 4607👍, 0💬

What Is an Array in PHP
What Is an Array in PHP? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations 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 a...
2007-04-20, 4828👍, 0💬

How To Convert Numbers to Strings
How To Convert Numbers to Strings? - PHP Script Tips - Understanding String Literals and Operations In a string context, PHP will automatically convert any numeric value to a string. Here is a PHP script examples: &lt;?php print(-1.3e3); print("\n"); print(strlen(-1.3e3)); print("\n"); print("Pr...
2007-04-20, 4850👍, 0💬

How To Convert Strings to Numbers
How To Convert Strings to Numbers? - PHP Script Tips - Understanding String Literals and Operations In a numeric context, PHP will automatically convert any string to a numeric value. Strings will be converted into two types of numeric values, double floating number and integer, based on the followi...
2007-04-20, 4859👍, 0💬

What Is File Upload
What Is File Upload? - PHP Script Tips - Uploading Files to Web Servers File upload is Web page function which allows visitor to specify a file on the browser's system and submit it to the Web server. This is a very useful function for many interactive Web sites. Some examples are: Web base email sy...
2007-04-19, 5051👍, 0💬

Which HTML Tag Allows Users to Specify a File for Uploading
Which HTML Tag Allows Users to Specify a File for Uploading? - PHP Script Tips - Uploading Files to Web Servers To present an input field on your Web page to allow users to specify a local file to upload, you need to use the &lt;INPUT TYPE="FILE" ...> tag inside a &lt;FORM ...> tag. The &...
2007-04-19, 4860👍, 0💬

How To Write the FORM Tag Correctly for Uploading Files
How To Write the FORM Tag Correctly for Uploading Files? - PHP Script Tips - Uploading Files to Web Servers When users clicks the submit button, files specified in the &lt;INPUT TYPE=FILE...> will be transferred from the browser to the Web server. This transferring (uploading) process is control...
2007-04-19, 4577👍, 0💬

How To Perform Key Word Search in Tables
How To Perform Key Word Search in Tables? - PHP Script Tips - Working with MySQL Database The simplest way to perform key word search is to use the SELECT statement with a LIKE operator in the WHERE clause. The LIKE operator allows you to match a text field with a keyword pattern specified as '%keyw...
2007-04-19, 4930👍, 0💬

How To Query Multiple Tables Jointly
How To Query Multiple Tables Jointly? - PHP Script Tips - Working with MySQL Database If you want to query information stored in multiple tables, you can use the SELECT statement with a WHERE condition to make an inner join. Assuming that you have 3 tables in a forum system: "users" for user profile...
2007-04-19, 4876👍, 0💬

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