answersLogoWhite

0

If a string features a separator (e.g. a dot or a comma), use PHP's explode() function to get an array with the two parts:

$string = "hello,joe"

$array = explode(",", $string);

$array[0] will be "hello"

$array[1] will be "joe"

If not, you may use substr() to return a certain length of a string

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Which method is used to retrive an initialitation parameters from a servlet context?

ServletContext sc=getServletContext(); String s=sc.getInitParameter();


What function are used for string length in visual basic?

string length is a function use to check the lenght of a string i.e number of alphabets in a word or sentence.


What is the puporse of using Val function in Visual basic 6.0?

Val() function is used in Visual Basic 6.0 to convert a string to a numeric value (such as integer, double etc.) or to extract a numeric value out of a string, as illustrated below.Val function as used to convert a string to a numeric valuefor example, let str be a string,Dim str as stringDim int as integerstr="09090"int=val(str)gives int = 9090also, used to extract the numeric part out of a following string,ie. a=val("98ASR_tyui") would give a=98however,b=val("The89")would give b=0 as there is no numeric value preceding the string.


What is a decryption of the hash string 108933322ed670db49b0141d10f6dbbe?

To decode a hash string you first need to know what hash function was used to encode it.


What text function capitalize the first letter of a string of data?

The capitalize() function in Python can be used to capitalize the first letter of a string. It returns a copy of the string with the first letter capitalized and all other letters in lowercase.


What is used to locate a string in excel?

You can use the find command of the FIND function.


What is cursors in oracle?

cursor is used to retrive multiple rows at a time


What is th function of the charindex?

The CHARINDEX function in SQL is used to find the position of a specific character or substring within a string. It returns the starting position of the substring or character within the given string.


Why printf is used instead of print in c?

The printf() function prints a formatted string.


Can you provide an example of how to use the keyword "headstring" in a programming function?

In programming, the keyword "headstring" can be used to extract a specific number of characters from the beginning of a string. For example, in a function that takes a string as input and uses "headstring" to extract the first 5 characters, the code might look like this: python def extractheadstring(inputstring): head inputstring:5 return head In this function, the "headstring" keyword is used to extract the first 5 characters from the input string and return them as a new string.


What is the string that you pull to turn on a ceiling light called?

The string that you pull to turn on a ceiling light is called a pull chain or pull string. It is typically connected to the light fixture and used to control the on/off function of the light.


What part of speech is the word function?

Function can be a noun and a verb. Noun: What something is used for. Verb: To have a function.