note 104977 added to function.print

From: Date: Tue, 19 Jul 2011 21:15:58 +0000
Subject: note 104977 added to function.print
Groups: php.notes 
Request: Send a blank email to php-notes+get-181712@lists.php.net to get a copy of this message
It's because echo & print dont *return* string value, so you can't use them with the concatenation operator ( . ) It's like when you do a $bar = array(); echo 'FOO > ' . print_r($bar); The print_r($bar) will be printed and THEN the 'FOO >' whill be echoed That's because print_r as echo or print dosnt return value. The fact that the ouput starts from the right to the left is most likely linked to the way php handles concatenation, i guess. ---- Server IP: 69.147.83.197 Probable Submitter: 82.120.164.140 ---- Manual Page -- http://www.php.net/manual/en/function.print.php Edit -- https://master.php.net/note/edit/104977 Del: integrated -- https://master.php.net/note/delete/104977/integrated Del: useless -- https://master.php.net/note/delete/104977/useless Del: bad code -- https://master.php.net/note/delete/104977/bad+code Del: spam -- https://master.php.net/note/delete/104977/spam Del: non-english -- https://master.php.net/note/delete/104977/non-english Del: in docs -- https://master.php.net/note/delete/104977/in+docs Del: other reasons-- https://master.php.net/note/delete/104977 Reject -- https://master.php.net/note/reject/104977 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181712) next »