note 50570 added to function.implode

From: Date: Thu, 03 Mar 2005 17:47:25 +0000
Subject: note 50570 added to function.implode
Groups: php.notes 
Request: Send a blank email to php-notes+get-85880@lists.php.net to get a copy of this message
Even handier if you use the following: <?php $id_nums = array(1,6,12,18,24); $id_nums = implode(", ", $id_nums); $sqlquery = "Select name,email,phone from usertable where user_id IN ($id_nums)"; // $sqlquery becomes "Select name,email,phone from usertable where user_id IN (1,6,12,18,24)" ?> ---- Manual Page -- http://www.php.net/manual/en/function.implode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50570 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50570&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50570&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50570&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50570&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50570&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50570&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85880) next »