2 Syntax Questions

From: Date: Sat, 04 May 2002 11:37:46 +0000
Subject: 2 Syntax Questions
Groups: php.general 
Request: Send a blank email to php-general+get-96034@lists.php.net to get a copy of this message
I'm very new to PHP. I've scanned the manual for these two, but I can't quite find the answers: 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."\">"); ?> 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? Thanks! Mark

« previous php.general (#96034) next »