Jump to content

Recommended Posts

I have been looking at this line for several hours now and can not seem to see what is wrong.  If you have any ideas it would be a great help.

 

Error: PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in

 

 

<td align="left" class="main"><?php echo '<a href="javascript:popupWindow('' .  (HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDERS_PRINTABLE) . '?' .

 

(tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id']) . '')">' . tep_template_image_button('button_printorder.gif',

 

IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></td>

 

 

Thanks

Mike

Link to comment
https://forums.phpfreaks.com/topic/179580-problem-with-code/
Share on other sites

<td align="left" class="main"><?php echo '<a href="javascript:popupWindow('' .  (HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDERS_PRINTABLE) . '?' .

(tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id']) . '')">' . tep_template_image_button('button_printorder.gif',

IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></td>

 

Immediately after the "popupWindow(" there is a single quote, which closes the literal being echo'd.  This is immediately followed by another single quote which would START a new literal except there is no operator to combine the strings.  I suspect you are trying to put a literal single-quote in the string, if so, you have to escape it (also escape the one at the end of the parameter list):

 

<td align="left" class="main"><?php echo '<a href="javascript:popupWindow(\'' .  (HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDERS_PRINTABLE) . '?' .

(tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id']) . '\')">' . tep_template_image_button('button_printorder.gif',

IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></td>

 

[ code ] tages are a marvelous thing.  See how the red shows literals and the blue shows variables (and green shows functions)?

Link to comment
https://forums.phpfreaks.com/topic/179580-problem-with-code/#findComment-947608
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.