note 123267 added to language.operators.string

From: Date: Sat, 27 Oct 2018 05:45:22 +0000
Subject: note 123267 added to language.operators.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-209532@lists.php.net to get a copy of this message
Concatenation inside of a for/foreach loop. Great for adding onto a string. function Coffee($string){ $arr = ["Loves", "Coffee", "With", "His", "Donuts"]; foreach($arr as $items){ $string .= ' ' . $items; } return $string; } echo Coffee("Joe"); ---- Server IP: 208.43.231.9 Probable Submitter: 2601:144:c200:7530:c127:7fce:9031:c14a ---- Manual Page -- http://php.net/manual/en/language.operators.string.php Edit -- https://master.php.net/note/edit/123267 Del: integrated -- https://master.php.net/note/delete/123267/integrated Del: useless -- https://master.php.net/note/delete/123267/useless Del: bad code -- https://master.php.net/note/delete/123267/bad+code Del: spam -- https://master.php.net/note/delete/123267/spam Del: non-english -- https://master.php.net/note/delete/123267/non-english Del: in docs -- https://master.php.net/note/delete/123267/in+docs Del: other reasons-- https://master.php.net/note/delete/123267 Reject -- https://master.php.net/note/reject/123267 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#209532) next »