ConFoo Montreal 2026: Call for Papers

Voting

: min(one, five)?
(Example: nine)

The Note You're Voting On

mail at tinodidriksen dot com
8 years ago
The example shows this to generate the needed number of question marks, which is amazingly wasteful:
$place_holders = implode(',', array_fill(0, count($params), '?'));

Instead, just do:
$place_holders = '?'.str_repeat(',?', count($params)-1);

<< Back to user notes page

To Top