1.

What is substr() in PHP? and how it is used?

Answer»

It is used to extract a part of the string. It allows THREE parameters or arguments out of which two are mandatory, and one is optional

echo substr("Hello world",6);

It will return first six characters from a given string.

92. What the use of var_dump()?

It is used to DUMP information about one or more VARIABLES. It displays structured data such as the type and value of the given variable.

Example:

$var_name1=12; int(12);



Discussion

No Comment Found