On Saturday 04 May 2002 19:37, Miva Guy wrote: > I'm very new to PHP. I've scanned the manual for these two, but I can't > quite find the answers:
Wouldn't it have been quicker to just try it for yourself? > 1. Is the following legal? > <INPUT TYPE="hidden" NAME="user_id" VALUE="<? echo $user_id ?>"> > Or is it necessary to do this? > <? echo("<INPUT TYPE=\"hidden\" NAME=\"user_id\" > VALUE=\"".$user_id."\">"); ?> Both are OK. But for readability you could change the second to: <? echo('<INPUT TYPE="hidden" NAME="user_id" VALUE="' . $user_id .'">'); ?> > 2. If I use the <? if: else: endif; ?> syntax to avoid echoing larger > blocks of HTML, within those statements, is it legal to use the standard <? > if(...) {...} else {...} ?> syntax? Yes. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You possess a mind not merely twisted, but actually sprained. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php