Re: first letter

From: Date: Mon, 20 Dec 2004 19:12:33 +0000
Subject: Re: first letter
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204749@lists.php.net to get a copy of this message
if i have for example this variable $name = "John"; how can i echo the first letter only so the result on the browser will be "J"
echo $name[0]; You could also use the substr() function. Larry

« previous php.general (#204749) next »