문제

while ( is_numeric( $flyer{$idPos} )) {
    //some code
}

What does $flyer{$idPos} mean assuming both are variables?

도움이 되었습니까?

해결책

This is an alternative, not recommendable syntax for accessing array entries:

$flyer{$idPos} === $flyer[$idPos]

다른 팁

Curly braces are a way to access a specific character of a string

$str = 'Bob';
echo $str{0}; // outputs B
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top