[nycphp-talk] receiving params passed from one webpage to another

Raymond DeRoo rderoo at
Thu Jun 6 09:32:02 EDT 2002

> Wouldn't it be cleaner to do
> echo "please help by <a href=\\"browform.php?brow$brow\\">letting us
> know</a>";
> ???

I would say that is a matter of opinion. I go to great lengths not to have 
php output HTML. 

I personally find

please help by <a href="browform.php?brow=<?php echo "$brow"; ?>">letting us 

to much easier easier to read than

echo "please help by <a href=\\"browform.php?brow$brow\\">letting us know</a>";

especially when working within syntax highlighting editors. Not to mention it 
is faster to not have PHP parse something it will do nothing with. Granted in 
this case no speed increase would be realized.

I tend to break a page into two parts. The first or top part has just about 
all the PHP code which the page is going to use. The second or bottom has the 
HTML and where I need to insert a value I simply <?=$var?>.  Now, as a rule, 
I do not use short tags (ie one will never find <? $php_code_here; ?>) but 
allowing for the ASP style output is *very* nice and, IMO, go a long way to 
making readable code.


More information about the talk mailing list