PHP
How many ways we can retrieve the date in result set of mysql Using php?
Dec 8th
As individual objects so single record or as a set or arrays.
Who is the father of php and explain the changes in php versions?
Dec 8th
Rasmus Lerdorf for version changes go to http://php.net/
Marco Tabini is the founder and publisher of php|architect.
What are the differences between GET and POST methods in form submitting, give the case where we can use get and we can use post methods?
Dec 8th
On the server side, the main difference between GET and POST is where the submitted is stored. The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method. On the browser side, the difference is that data submitted by the GET method will be displayed in the browser’s address field. Data submitted by the POST method will not be displayed anywhere on the browser.
GET method is mostly used for submitting a small amount and less sensitive data. POST method is mostly used for submitting a large amount or sensitive data.
More >What do you need to use the image functions in PHP?
Dec 8th
You need to have access to the GD Library in order to use the image functions in PHP.
How do you remove the last letter from a string?
Dec 8th
There are many ways to do this. An interviewer will be looking for you to use a compact method. Here is probably the simplest method:
$data = “One too many letterss”; $newdata = substr($data,0,-1);// now ‘one too many letters’
What’s the difference between md5(), crc32() and sha1() crypto on PHP?
Dec 8th
The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.
How do you access data submitted through GET or POST from a form?
Dec 8th
To access data use $_GET and $_POST respectively. For instance if a form is submitted with a field named ‘email’ through post, then this becomes available as $_POST[email].
With GET, the information is posted in the URL so this is useful if you want to store or bookmark a URL that relies on parameterised data. However GET is less secure, and also has strict limits on the amount of data that can be sent.
What’s the difference between htmlentities() and htmlspecialchars()?
Dec 8th
htmlspecialchars only takes care of <, >, single quote ‘, double quote ” and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.
What is the difference between characters ?23 and x23?
Dec 8th
The first one is octal 23,the second is hex 23.
