Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the first letter of a Variable?

Status
Not open for further replies.

Naits

Programmer
Oct 10, 2001
90
NO
My variable is $name="Stian"; how can i getthe first letter in that variable?
 
That returns an integer (the ASCII value), you might try
Code:
substr ($name, 0, 1);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top