phpbar.de logo

Mailinglisten-Archive

[php] Zeichenvergleich?

[php] Zeichenvergleich?

Marc-Alexander Prowe php_(at)_phpcenter.de
Thu, 31 Jan 2002 11:32:42 +0100


Guten Tag Michael Koch,
am Donnerstag, 31. Januar 2002 um 11:20 schrieben Sie:

> if( $stringvariable[ 0 ] == '#' ) {
>         // mach was
> }

Manual: Note: For backwards compatibility, you can still
use the array-braces. However, this syntax is deprecated
as of PHP 4.

Neue Syntax:

if( $stringvariable{0} == '#' ) {
     // mach was
}

-- 
[ mfg: marc-alexander prowe ]
[ http://www.virtuelle-maschine.de ]
[ mailto:listen_(at)_mohajer.de ]

.


php::bar PHP Wiki   -   Listenarchive