Reply to Re: [PHP] parse error, unexpected T_ENCAPSED_AND_WHITESPACE

Your name:

Reply:


Posted by Dan Tappin on 03/15/05 02:08

Why not make it simple?:

// end PHP code ?>

<td><input type='checkbox' name='status[<? echo $row['profileID']; ?>]'
value='true'></td>

<? // continue PHP code

Dan T

On Mar 14, 2005, at 3:58 PM, Jeff Schmidt wrote:

> Hello,
> I'm beating my head, and can't figure out *WHY* PHP is giving me
> this error. The full error text is:
>
> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
> expecting T_STRING or T_VARIABLE or T_NUM_STRING in
> /hsphere/local/home/welding/weldingconsultants.com/wcapp/admin.php on
> line 82
>
> Line 82 is:
> print '<td><input type=\'checkbox\' name=\'status[' .
> $row["profileID"] . ']' . "' value='true'/></td>\n";
>
> The problem seems to have something to do with the construct
> $row["profileID"] - I say this, because I pulled that out into a
> seperate line before this, at one point, just to test, and assigned it
> to a variable, and put the variable in place of the array access. That
> is, to test, at one point, my file had:
>
> $profID = $row["profileID"];
> print '<td><input type=\'checkbox\' name=\'status[' . $profID . ']' .
> "' value='true'/></td>\n";
>
> When I had done that, the parser started choking at the top line.
>
> I've attached the full file, to see the context that this is in.
>
> Can *anyone* explain this error? It's completely breaking my script. I
> suspect, that the *real* error is somewhere earlier in the file, but
> I've read through it 20 times and just can't find anything out of
> place (can't find any obvious syntax errors, for example).
>
> Thanks for any help you can give me,
>
> Jeff Schmidt
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация