<< < 6 7 8 9 10 11   Sort: Date

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

How To Create a New Table
How To Create a New Table? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts 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 ...
2007-05-10, 4861👍, 0💬

How Values Are Returned from Functions
How Values Are Returned from Functions? - PHP Script Tips - Creating Your Own Functions If a value is returned from a function, it is returned by value, not by reference. That means that a copy of the value is return. Here is a PHP script on how values are returned from a function: &lt;?php $fav...
2007-04-24, 4861👍, 0💬

What is differece between echo and printf in php
What is differece between echo and printf in php PHP Echo Vs Print Diagram <?php print "Hello World! "; echo "Hello World! "; // The above outputs the text "Hello World!" on two separate lines. // Notice they are identical in output! print ("Hello World! "); echo ("Hello World! "); // The above a...
2011-08-01, 4858👍, 0💬

How To Retrieve the Original Query String
How To Retrieve the Original Query String? - PHP Script Tips - Processing Web Forms 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...
2007-04-22, 4857👍, 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, 4849👍, 0💬

Is It More Secure to Use Cookies to Transfer Session IDs
Is It More Secure to Use Cookies to Transfer Session IDs? - PHP Script Tips - Understanding and Using Sessions Is it more secure to use cookies to transfer session IDs? The answer is yes, because attacking your Web site using URL parameters is much easier than using cookies. So if you are the system...
2007-04-17, 4849👍, 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, 4842👍, 0💬

Why Do You Need to Filter Out Empty Files
Why Do You Need to Filter Out Empty Files? - PHP Script Tips - Uploading Files to Web Servers 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...
2007-04-19, 4837👍, 0💬

What Do You Need to Connect PHP to MySQL
What Do You Need to Connect PHP to MySQL? - MySQL FAQs - PHP Connections and Query Execution If you want to access MySQL database server in your PHP script, you need to make sure that a MySQL API module (extension) is installed and turned on in your PHP engine. PHP 5 now supports two MySQL API exten...
2007-05-10, 4835👍, 0💬

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

How To Open a File for Writing
How To Open a File for Writing? - PHP Script Tips - Reading and Writing Files If you want to open a new file and write date to the file, you can use the fopen($fileName, "w") function. It creates the specified file, and returns a file handle. The second argument "w" tells PHP to open the file for wr...
2007-04-22, 4826👍, 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, 4824👍, 0💬

How To Define a Function with Any Number of Arguments
How To Define a Function with Any Number of Arguments? - PHP Script Tips - Creating Your Own Functions 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...
2007-04-25, 4798👍, 0💬

How To Quote Date and Time Values in SQL Statements
How To Quote Date and Time Values in SQL Statements? - PHP Script Tips - Working with MySQL Database If you want to provide date and time values in a SQL statement, you should write them in the format of "yyyy-mm-dd hh:mm:ss", and quoted with single quotes ('). The tutorial exercise below shows you ...
2007-04-19, 4769👍, 0💬

How To Pass Variables By References
How To Pass Variables By References? - PHP Script Tips - Creating Your Own Functions 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 reference...
2007-04-24, 4744👍, 0💬

How To Install PHP on Windows
How To Install PHP on Windows? - MySQL FAQs - PHP Connections and Query Execution 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...
2007-05-10, 4734👍, 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, 4734👍, 0💬

How To Insert Data into a Table
How To Insert Data into a Table? - PHP Script Tips - Working with MySQL Database If you want to insert a row of data into a table, you can use the INSERT INTO statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_links (id, url) VALUE...
2007-04-19, 4699👍, 0💬

<< < 6 7 8 9 10 11   Sort: Date