Re: few things...

From: Date: Sat, 31 Aug 2002 10:01:23 +0000
Subject: Re: few things...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114755@lists.php.net to get a copy of this message
comments inline ----- Original Message ----- From: "Matt Zur" <mattz@zurnet.com> To: <php-general@lists.php.net> Sent: Saturday, August 31, 2002 4:40 AM Subject: [PHP] few things... > First of all... > I'm a bit confused is there really a difference between echo and print? > They seem to do the same thing? As far as anyone is concerned they do the same... Check the archives for MANY MANY past discusions > > Also... I have trouble searching for these things in the docs: > A Call Function to emulate a browser and contact a remote host? For > example... to load in a piece of text from another web site? fopen? here is a quick snip from the user comments $page= join ('', file ('www.yahoo.com')); that basically loads all the HTML at Yahoo.com into the varible $page... neat huh :) > > Hidden fuction. For example lets say I have a form with 10 variables. > Is there a function where I can do something like: > > hidden($var1,$var2,$var3) etc etc so it will write this: > <input type="hidden" name="var1name" value="var1value"> > <input type="hidden" name="var2name" value="var2value"> > <input type="hidden" name="var2name" value="var2value"> PHP doesn't really write HTML for you, thats your job... so a function or a simple loop could do this... for ($i=0; $i<3; $i++) echo "<input type='hidden' name='$$var[$i]' value='$var[$i]'>"; > > Thanks for the help! No problems :) Andrew > > PHP Toolbar for Homesite v5.0 - http://zurnet.com/dl/hsphptb/ > Version 1.5 Coming Soon!!! > > > > -- > Matt Zur > mattz@zurnet.com > http://www.zurnet.com >

« previous php.general (#114755) next »