note 62118 added to function.implode

From: Date: Mon, 20 Feb 2006 16:42:10 +0000
Subject: note 62118 added to function.implode
Groups: php.notes 
Request: Send a blank email to php-notes+get-104073@lists.php.net to get a copy of this message
The 4.3 modification to implode means that it can optionally recieve 1 variable, not 0 variables: <?php $array = array("Ahern" , "Morris" , "Lusk"); echo implode($array); ?> would output: AhernMorrisLusk while: <?php $array = array("Ahern" , "Morris" , "Lusk"); echo implode(", ",$array); ?> would output: Ahern, Morris, Lusk And implode(glue, array) the prefered sintax over implode(array). If there is nothing for implode to join, there's nothing for implode to use. Above example tested on 4.3.11 ---- Server IP: 216.194.113.175 Probable Submitter: 71.13.158.12 ---- Manual Page -- http://www.php.net/manual/en/function.implode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+62118 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62118&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+62118&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104073) next »