an alphanumeric or string variable is used to represent any non numeric value. it can be represented by one or more letters or digits but it should start with a letter and end with a dollar sign
some examples are a$,r45$ etc....
All variables in PHP start with which symbol?
In PHP, all variables must the preceded by the dollar sign.
Variable name must not contain any space as well.
How do you count the vowels in a string using PHP?
build an array of vowels then do a foreach on the array and then explode the string on the array value and the answer is -1 of the result
PHP termed as Hypertext Pre-processor is one of the core technologies that is a part of the web development services which is considered to be the most popular programming language that help in creating website & portals categorized as CRM oriented, ecommerce websites etc.
Source: Webzesty UK
Where can you find an email attachment PHP script?
I assume you mean email attachments.
Use phpmailer.
$email=new PHPMailer();
$email->AddAttachment($files_to_attach);
What is 2 tier architecture in PHP?
Client-Server model is a form of 2 Tier architecture in PHP. With use of database it becomes a 3 Tier architecture
What are the advantages and disadvantages of PHP functions?
There are too many (hundreds) functions for there to be an answer to this. Advantages are that they can be used server side to print output that can be translated from databases etc. Disadvantages it that it can delay the loading time of all you pages.
Module can, among other things, such as variables or constants, include one or more functions.
(A term function can not be used in a contex of object oriented programming. Substitute for this is called a method. Method is included in class.)
How do you create a text editor in PHP?
Well it got nothing to do with PHP, you going to need JavaScript to do that :)
How to reduce the memory leak in php?
If you are running into PHP memory leaks and frequent our of memory errors you can try moving your code into functions. PHP automatically does garbage collection after each function call. Another thing I see a lot of is not closing your database connection strings after using them as this cause build up and cause memory issues as well.
How do you find version of PHP in uniform server?
The easiest way is to create a file with a name ending in .php (such as info.php), containing only these 3 lines: <?
phpinfo();
?> Upload this file to your web space and access it using your browser. It will show a lot of information about your webserver and the php version running on it.
How do you create a DIV type file using PHP?
A file with the DIV file extension is a DivX Movie file, it cannot be created with PHP.
PHP is a web programming language for web site building.
How do you insert data to a database using a PHP form?
You will need a table first, this can be created via your Database - PHPMyAdmin,
Inputting data in PHP - MySQL
e.g
mysql_query("INSERT INTO `users` VALUES('$name','$pass','$gender','$email')") or die("Errored due to:
".mysql_error());
This will Input the values into the table you created with the details of the registering person.
Notice that any form element in an HTML page will automatically be available to your PHP scripts.
Can a database only be stored on a computer?
No, it can in fact be stored in a file outside of a computer...what boff wants to know that!?
What is the text move function in PHP?
"Text move" isn't very clear. If you want to assign strings to different variables, use the assignment operator: <?php
$old_var = 'blah';
$new_var = $old_var;
echo $new_var; // Displays "blah"
?>
If you want to work with a certain part of a string, use substr(): <?php
$part_of_string = substr($string, $start, $length);
// $start should be an integer, indicating which character to start obtaining the string at
// $length should be an integer, indicating how many characters you want to obtain.
echo = substr('somesimplestring', 5, 6); // Displays "simple"
?>
How can you use Crystal Reports in PHP?
In order to use Crystal Reports with PHP you need to be running PHP on a Windows server because Crystal Reports is a windows application. Most places will not let this be installed on a shared server but if you have a dedicated server or vps, at a place like hostmysite.com, you will be able to install the crystal reports software. Here is the syntax you will use to create report with Crystal Reports on a windows server:
$cr=new com("Crystal.CRPE.Application")
or die("cannot load cr com");
$rn="F:\notes5\test.rpt";
$rap=$cr->OpenReport($rn);
What is the correct way to end a PHP statement?
Each statement is ended with a semicolon. PHP is derived from C, so a lot of the components are very similar, including this.
Google doesn't seem to care about these but for user's sake, for the sake of community and as a good practice, it is best to redirect and redirection should be 301.
How do you generate random questions in PHP?
Depends where is the data.
If you use a DB server, you can simply use the DB server's function (such as RAND()).
A simple MySQL query would be:
SELECT id, question FROM questions ORDER BY RAND() LIMIT 1,0;
You can also generate a random number using rand() and use:
SELECT id, question FROM questions WHERE id = '<random_numer_comes_here>' LIMIT 1,0;
But you'll have to ensure that that the id number exists (you can use a loop until you find one or reach max tries).
Hope that helps.
A form of energy that results from the movment of machine parts?
Machine parts generate heat, light, and sound as a result of the friction involved in their movement. These energy sinks can be reduced, but never eliminated, by use of superior materials and lubricants.
What are all the built-in PHP functions?
See the related links for a shortcut to the entire reference of every function in PHP. The default built-in functions differ from the categories of extensions you choose to install, and the version of PHP you're installing - therefore, it's impossible to give a stable list of built-in functions.
What are some advantages and disadvantages of using PHP?
PHP is a rather loose language that is fairly upfront. Functions, classes, and variables are easy to manipulate and use. It has very similar syntax in comparison to higher level languages such as C, allowing the branching of more complicated languages (starting with a watered down language like PHP). The PHP engine parses scripts quickly, and has a very elaborate error system, detailing why an error occured, where it started or ended, and what caused it (if applicable). Easy INI settings allow you to surpress these errors when it's time to put your website to professional use (the INI settings can control many other options, at that). PHP has MySQL, Oracle, and many other major database support. Extensions can be added on to further the classes and functions a programmer is capable of performing. You can even write your own scripts and share them with the world with the PHP Extensive Application Repository (or, PEAR for short). However, some people find the PHP language complicated -- or contrary, too loose. Programmers with little experience may find complex source too difficult to understand, and they may never end up understanding it. Programmers with higher levels of experience may find PHP's syntax to be too lose; for example, comparing an integer to string that has an integer in it (two completely different types of variables) would cause errors in higher level languages, stating that the comparison is invalid. PHP allows this sort of syntax, and (in a sense) converts the string into an integer.
What is a preprocessor in PHP?
As it is, PHP does not have a preprocessor; it is a preprocessor that processes form variables and other environmental variables and prints HTML or general text.
Program for palindrome in php?
You could use a function like this:
function isPalindrome($string) {
$string = strtolower($string);
return (strrev($string) == $string) ? true : false;
}
and then to check a palindrome call an if statement like so:
if(isPalindrome($test)) {
echo $test.' is a palindrome';
}
else {
echo $test.' is not a palindrome';
}
How do you display PowerPoint Presentations using PHP?
PHP is not capable of displaying PowerPoint Presentations without another language that does support the display of PowerPoint presentations.
Alternatively, you may turn the PowerPoint into a video and print another language capable of displaying videos using PHP.