Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 PHP 有一个包含 100 个键的数组,我想回显所有键,但是,我想在显示每 10 个键后添加一个:键 1-10 (0-9)、11-20、21-30 ...很快。
您需要使用Modulus运算符:
if (!($key % 10)) { // page break }