Re: cvs: php4 /pear/scripts pear.in

From: Date: Wed, 23 May 2001 12:48:43 +0000
Subject: Re: cvs: php4 /pear/scripts pear.in
References: 1 2  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-177@lists.php.net to get a copy of this message
Stig Sæther Bakken wrote: > > ["Thomas V.V.Cox" <cox@idecnet.com>] > > + if ($param[0] != DIRECTORY_SEPARATOR) { > > I think $param{0} is the correct syntax here (although the above > works, it's not recommended). > Sorry Stig, I don't understand you here. $param is a string and $param[0] is the first char, why use "{}"? I thought that {} was only for escape vars inside a string. This is documented in the manual language.types.string.html: /* Get the first character of a string */ $str = 'This is a test.'; $first = $str[0]; Tomas V.V.Cox

« previous php.pear.cvs (#177) next »