Darren,

Small confusion in the typing of the original (accurate) submission. It is all one 
word "heredoc" and can be
found in the manual (using Paul's recommended location) check out
http://uk.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc.
 Think of the
<<<something ... something (margin position second something is v.important) as 
equivalent to '...' or "..."
(opening and closing marks to delimit a string) and you'll be away.

=dn


----- Original Message -----
From: "p.whiter" <[EMAIL PROTECTED]>
To: "PHP-DB List" <[EMAIL PROTECTED]>; "Darren" <[EMAIL PROTECTED]>
Sent: 04 November 2001 02:07
Subject: Re: [PHP-DB] "EOQ" what does it mean??


> If you are running windows, I suggest you download the .chm version of the
> php manual, great for easy searching and bookmarking pages etc.
>
> http://uk2.php.net/distributions/manual/manual-en.chm
>
> To answer your question, the first piece of code will be, replace:
>
> $output = <<<EOQ
> </form>
> EOQ;
>
> with
>
> $output = print("</form>");
>
> and the next replace:
>
> $output = <<<EOQ
> <input type="text" name="$name" value="$value" size="$size" $maxatt>
> EOQ;
>
> with
>
> $output =print("<input type=\"text\" name=\"$name\" value=\"$value\"
> size=\"$size\" $maxatt>");
>
> When using the print statement you must remember to escape all " within the
> parenthesis with \
>
>  Paul
>
> ----- Original Message -----
> From: "Darren" <[EMAIL PROTECTED]>
>
>
> : You are exactly right from what I can tell.  I did you you suggested
> : and it worked!  There are several of those in the document.  Looked
> : it up in the book and have a limited idea on what it is, and also
> : learning from your example I have a better Idea.  But I did a search
> : for here docs, on the PHP site and couldn't find anything.  I think
> : I can probably figure out the other 6 or 7 in the document but I
> : can't figure this on out.
> :
> :
> : here tis
> :
> : // This function returns an HTML </form> tag.
> :
> : function end_form ()
> : {
> : $output = <<<EOQ
> : </form>
> : EOQ;
> :
> : return $output;
> : }
> :
> : *******
> : I know this must be simple but I just can't get it yet.  I tried
> : experimenting and putting other code in there to replace it but
> : nothing has worked... yet.
> :
> : Thanks again for the help
> :
> : Darren
> :
> : PS here is the next one in case you felt like looking at it
> :
> : // This function returns an HTML text input field. The default size
> : // of the field is 10. A value and maximum data length for the field
> : // may be supplied.
> :
> : function text_field ($name="", $value="", $size=10, $maxlen="")
> : {
> : $maxatt = empty($maxlen) ? "" : "maxlength=\"$maxlen\"";
> : $output = <<<EOQ
> : <input type="text" name="$name" value="$value" size="$size" $maxatt>
> : EOQ;
> : return $output;
> : }
> :
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to