PHP 8.5.0 Beta 1 available for testing

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

mail at tinodidriksen dot com
9 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