Re: Re: Strange result, 1 shows up

From: Date: Thu, 16 Apr 2009 18:19:49 +0000
Subject: Re: Re: Strange result, 1 shows up
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-291575@lists.php.net to get a copy of this message
Thank you for your help! Gary ""kyle.smith"" <kyle.smith@inforonics.com> wrote in message news:D3FE56D174ABF6469079CA1A5C8474A804FA9AC7@nsmail01.inforonics.corp... You're echoing the return value of include(), which is "true", or 1. -- Kyle Smith Unix Systems Administrator -----Original Message----- From: Gary [mailto:gwpaul@ptd.net] Sent: Thursday, April 16, 2009 2:14 PM To: php-general@lists.php.net Subject: [PHP] Re: Strange result, 1 shows up Perfect, thanks so much. Do you know why the number 1 displayed? Thanks again. ""João Cândido de Souza Neto"" <joao@consultorweb.cnt.br> wrote in message news:9C.9A.24434.FC477E94@pb1.pair.com... > Try using only: include('box.inc.php'); instead of echo > include('box.inc.php'); > > > ""Gary"" <gwpaul@ptd.net> escreveu na mensagem > news:63.C9.24434.0B377E94@pb1.pair.com... >> When I insert this code into a page, I get a 1 show up. Can anyone >> explain that and tell me how to get rid of it? >> >> Thanks for your help. >> >> Gary >> >> <?php >> //Chooses a random number >> $num = Rand (1,6); >> //Based on the random number, gives a quote switch ($num) { case 1: >> echo include('box.inc.php'); >> break; >> case 2: >> echo ""; >> break; >> case 3: >> echo ""; >> break; >> case 4: >> echo ""; >> break; >> case 5: >> echo ""; >> break; >> case 6: >> echo ""; >> } >> ?> >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#291575) next »