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

How To Access a Global Variable inside a Function
How To Access a Global Variable inside a Function? - PHP Script Tips - Creating Your Own Functions By default, global variables are not accessible inside a function. However, you can make them accessible by declare them as "global" inside a function. Here is a PHP script on declaring "global" variab...
2007-04-24, 4751👍, 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, 4609👍, 0💬

How To Remove a Cookie
How To Remove a Cookie? - PHP Script Tips - Understanding and Managing Cookies 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 negat...
2007-04-24, 4876👍, 0💬

What Are Domain and Path Attributes for Cookies
What Are Domain and Path Attributes for Cookies? - PHP Script Tips - Understanding and Managing Cookies Cookies can also be defined with two other attributes: Domain - A cookie attribute that defines the domain name of Web servers where this cookie is valid. Web browsers holding this cookie should n...
2007-04-24, 5311👍, 0💬

What Is the Scope of a Variable Defined in a Function
What Is the Scope of a Variable Defined in a Function? - PHP Script Tips - Creating Your Own Functions The scope of a local variable defined in a function is limited with that function. Once the function is ended, its local variables are also removed. So you can not access any local variable outside...
2007-04-24, 4760👍, 0💬

What Is the Scope of a Variable Defined outside a Function
What Is the Scope of a Variable Defined outside a Function? - PHP Script Tips - Creating Your Own Functions 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 vari...
2007-04-24, 4901👍, 0💬

What Is the Common Mistake When Setting Path and Domain on Temporary Cookies
What Is the Common Mistake When Setting Path and Domain on Temporary Cookies? - PHP Script Tips - Understanding and Managing Cookies A common mistake made by many PHP developers is using an empty string for the expiration time parameter when setting path and domain for temporary cookies. The PHP scr...
2007-04-24, 4854👍, 0💬

How To Specify Domain and Path for a Cookie
How To Specify Domain and Path for a Cookie? - PHP Script Tips - Understanding and Managing Cookies If you want to specify domain and path for cookie, you can use the setcookie() function with two extra parameters. The sample PHP script below shows you how to set the domain and path attributes for t...
2007-04-24, 4838👍, 0💬

Can You Define an Array Argument as a Reference Type
Can You Define an Array Argument as a Reference Type? - PHP Script Tips - Creating Your Own Functions You can define an array argument as a reference type in the function definition. This will automatically convert the calling arguments into references. Here is a PHP script on how to define an array...
2007-04-24, 4921👍, 0💬

How To Return an Array from a Function
How To Return an Array from a Function? - PHP Script Tips - Creating Your Own Functions 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: &lt;?php function powerBall() { $a...
2007-04-24, 4696👍, 0💬

How Cookies Are Transported from Servers to Browsers
How Cookies Are Transported from Servers to Browsers? - PHP Script Tips - Understanding and Managing Cookies Cookies are transported from a Web server to a Web browser in the header area of the HTTP response message. Each cookie will be included in a separate "Set-Cookie:" header line in the followi...
2007-04-24, 4636👍, 0💬

How To View Cookie Header Lines
How To View Cookie Header Lines? - PHP Script Tips - Understanding and Managing Cookies If you are interested to see the cookie header lines, or you are having trouble with your cookies and need to see the cookies to help debugging, you can run your script with PHP CGI interface in a command line wi...
2007-04-24, 4821👍, 0💬

How To Pass Arrays By References
How To Pass Arrays By References? - PHP Script Tips - Creating Your Own Functions Like normal variables, you can pass an array by reference into a function by taking a reference of the original array, and passing the reference to the function. Here is a PHP script on how to pass array as reference: ...
2007-04-24, 4699👍, 0💬

How Arrays Are Passed Through Arguments
How Arrays Are Passed Through Arguments? - PHP Script Tips - Creating Your Own Functions 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 ...
2007-04-24, 4866👍, 0💬

Where Are the Persistent Cookies Stored on Your Computer
Where Are the Persistent Cookies Stored on Your Computer? - PHP Script Tips - Understanding and Managing Cookies The location and file names where persistent cookies are stored on your computer depend on which browser you are using. If you using Microsoft Internet Explorer, persistent cookies are st...
2007-04-24, 5371👍, 0💬

How Cookies Are Transported from Browsers to Servers
How Cookies Are Transported from Browsers to Servers? - PHP Script Tips - Understanding and Managing Cookies Cookies are transported from a Web browser to a Web server in the header area of the HTTP request message. Each cookie will be included in a separate "Cookie:" header line in the following fo...
2007-04-24, 4841👍, 0💬

Can You Pass an Array into a Function
Can You Pass an Array into a Function? - PHP Script Tips - Creating Your Own Functions You can pass an array into a function in the same as a normal variable. No special syntax needed. Here is a PHP script on how to pass an array to a function: &lt;?php function average($array) { $sum = array_su...
2007-04-24, 4755👍, 0💬

Can You Define an Argument as a Reference Type
Can You Define an Argument as a Reference Type? - PHP Script Tips - Creating Your Own Functions You can define an argument as a reference type in the function definition. This will automatically convert the calling arguments into references. Here is a PHP script on how to define an argument as a ref...
2007-04-24, 4688👍, 0💬

How To Delete Cookie Files on Your Computer
How To Delete Cookie Files on Your Computer? - PHP Script Tips - Understanding and Managing Cookies A simple way to delete cookie files on your computer is to use the function offered by the IE browser. The following tutorial exercise shows you how to delete cookie files created by IE: Open IE (Inte...
2007-04-24, 4661👍, 0💬

How View the Content of a Cookie File
How View the Content of a Cookie File? - PHP Script Tips - Understanding and Managing Cookies Cookie files are normal text files. You can view them with any text editor. Follow the steps below to see what is in a cookie file created by your own PHP script. Copy the following sample script, setting_p...
2007-04-24, 4828👍, 0💬

How Variables Are Passed Through Arguments
How Variables Are Passed Through Arguments? - PHP Script Tips - Creating Your Own Functions Like more of other programming languages, variables are passed through arguments by values, not by references. That means when a variable is passed as an argument, a copy of the value will be passed into the ...
2007-04-24, 4667👍, 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, 4530👍, 0💬

How Does FireFox Manage Cookies
How Does FireFox Manage Cookies? - PHP Script Tips - Understanding and Managing Cookies FireFox browser allows you to delete old cookies, and gives you options to keep persistent cookies in cookie files until they reach their expiration time. The following tutorial shows you how to manage cookies in...
2007-04-24, 4767👍, 0💬

How To Return a Value Back to the Function Caller
How To Return a Value Back to the Function Caller? - PHP Script Tips - Creating Your Own Functions You can return a value to the function caller by using the "return $value" statement. Execution control will be transferred to the caller immediately after the return statement. If there are other stat...
2007-04-24, 4709👍, 0💬

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