What is the PHP question mark?
The PHP question mark "<?" is a signal to the web server that everything up until "?>" will be PHP code and should be treated accordingly.
How do you create a PHP class?
To create a PHP class it is pretty simple, I will show you how to create a very basic class in an example below.
<?php
// the class
class myBasicClass {
// a function to add 2 numbers together and return the result
function add($num1, $num2) {
$result = $num1 + $num2;
return $result;
}
}
// load up the class
$myBasicClass = new myBasicClass;
// output the result
echo $myBasicClass->add(5, 10); // outputs the result 15
?>
How do you copy php files to a CD?
Create Data CD with any available CD burning software and insert the files. Burn.
How do you use sessions in PHP?
Sessions in PHP are easy to learn and set up, first of all you need to make sure you use the function session_start() at the start of each script to make sure the sessions work.
Then all you need to do is the following to store information in sessions:
<?php
// allow sessions to work on script
session_start();
// set up a session called my number
$_SESSION['my_number'] = 1;
?>
That's all you need to do to set up and store data in a session. Now if you want to delete a session you will need to use the unset() function like shown below:
<?php
unset($_SESSION['my_number']);
?>
To destroy all sessions in one go you can call the session_destroy() function. This will save you some time.
<?php
session_destroy();
?>
PHP was originally created by Rasmus Lerdorf in 1994. Rasmus Leodorf developed PHP to replace a set of scripts he had written in PERL.
It was developed to be one of the first, and still one of the most powerful Object-Oriented web scripting engines.
What is the difference between sort and asort in PHP?
sort() will order the array by its values without preserving the keys. Use it when array is indexed numerically or when you do not care about the keys.
asort() will also sort the array by its values, but it will preserve the key -> value association.
I'm just going to assume that "left" and "right" are names of an input fields, and that the form type is "POST"
in the php file that your form is posted to, you can get these values like this:
$left = $_POST["left"];
$right = $_POST["right"];
now $left and $right will have the values from your form, and you can use them as you like.
Bravenet seems to support PHP 5.2 in fastcgi mode on Premium Plans.
I've included the link to their plans page as a reference.
How do you remove an old PHP installation and install a new one?
Re-installing a php installation be it windows or unix depends on the method it was installed originally.
In linux/unix this may be binary or from source and depending on the installation method and the subsequent method of package removal,reinstall should be followed.
If the original package was compiled from source,the appropriate compilation options and flags may need to be followed or existing applications may not work.
Can you generate DLL files from PHP scripts like you do in PERL?
You can make a .NET DLL for use in Visual Studio development projects with Phalanger 2.0.
made about 1977.
Which one is easy to learn PHP or QA testing?
You are trying to compare two things that are completely different. PHP is a programming language, and QA testing is a step in the creation of products.
We can write php extension is many way...
.php , .php5, .php4
When was CGI introduced to cinema?
CGI or Computer Generated Imagery was first introduced to cinema in 1967 with the ten minute film Hummingbird by Charles Csuri and James Shaffer. Other films included Kitty, a 1968 Russian film that was a mathematical model of a moving cat.
How do you create a login system using PHP?
Here are the steps
I am providing a few links which will serve good purpose to learn the login system. Remember to do the simple things first then move onto more complex scenarios.
What does a representative character stand for?
they have theyre own characteristics but they also represent a certain class or type of people
A function statement is a block where the function is declared and defined.
Core PHP is the language without the addition of various modules and extensions, such as EXIF, GDI, MySQL, and so on. It is the basic language.