[英]Confused about this php code using curly braces
while ( is_numeric( $flyer{$idPos} )) {
//some code
}
假設兩者都是變量, $flyer{$idPos}
是什么意思?
這是訪問數組條目的另一種不推薦的語法:
$flyer{$idPos} === $flyer[$idPos]
花括號是訪問字符串的特定字符的一種方法
$str = 'Bob';
echo $str{0}; // outputs B
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.