Question

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

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

Was it helpful?

Solution

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

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

OTHER TIPS

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

$str = 'Bob';
echo $str{0}; // outputs B
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top