PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 8th, 2005, 03:01 AM
vertmonkee vertmonkee is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 3 vertmonkee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m
Reputation Power: 0
Help with an error

I was trying to modify some code and end up with the error message

Parse error: parse error, expecting `')'' in C:\Program Files\Apache Group\Apache2\htdocs\work\catalog\admin\categories .php on line 1570

This is the code from line 1570

PHP Code:
 $contents[] = array('align' => 'center''text' => '<a href="' tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' $pInfo->products_id '&action=new_product') . '">' tep_image_button('button_edit.gif'IMAGE_EDIT) . '</a> <a href="' tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' $pInfo->products_id '&action=delete_product') . '">' tep_image_button('button_delete.gif'IMAGE_DELETE) . '</a> <a href="' tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' $pInfo->products_id '&action=move_product') . '">' tep_image_button('button_move.gif'IMAGE_MOVE) . '</a> <a href="' tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' $pInfo->products_id '&action=copy_to') . '">' tep_image_button('button_copy_to.gif'IMAGE_COPY_TO) . '</a> '<a href="./new_attributes.php?action=select&current_product_id=' . $pInfo->products_id . '&cPath=' . $cPath . '"> . tep_image_button('button_edit_attributes.gif''Edit Attributes') . '</A>' <a target="_blank" href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $pInfo->products_id . '"> . tep_image_button('button_preview.gif'IMAGE_PREVIEW) . '</a>'); 


I have tried to figure out what is missing and can not manage it. Can anyone please help me.

Many Thanks

Reply With Quote
  #2  
Old February 8th, 2005, 04:23 AM
mattp23 mattp23 is offline
Moderated
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: UK
Posts: 82 mattp23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 44 sec
Reputation Power: 6
If you format it better the problem becomes obvious (4 errors):
PHP Code:
 $contents[] = array(
    
'align' => 'center'
    
'text' => '<a href="' 
             
tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID='
                          
$pInfo->products_id '&action=new_product')
             . 
'">' 
             
tep_image_button('button_edit.gif'IMAGE_EDIT
             . 
'</a> <a href="' 
             
tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID='
                          
$pInfo->products_id '&action=delete_product'
             . 
'">' 
             
tep_image_button('button_delete.gif'IMAGE_DELETE
             . 
'</a> <a href="' 
             
tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID='
                           
$pInfo->products_id '&action=move_product'
             . 
'">' 
             
tep_image_button('button_move.gif'IMAGE_MOVE
             . 
'</a> <a href="' 
             
tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' 
                          
$pInfo->products_id '&action=copy_to'
             . 
'">' 
             
tep_image_button('button_copy_to.gif'IMAGE_COPY_TO
# Next line wrong:
#            . '</a> '<a href="./new_attributes.php?action=select&current_product_id=' 
# this line should read
             
'</a> <a href="./new_attributes.php?action=select&current_product_id=' 
             
$pInfo->products_id 
             
'&cPath=' 
             
$cPath 
# This line wrong:
#             . '"> 
# should be
             
'"> '
             
tep_image_button('button_edit_attributes.gif''Edit Attributes'
# Next line wrong:
#             . '</A>' <a target="_blank" href="' 
# This line should read
             
'</A> <a target="_blank" href="' 
             
HTTP_CATALOG_SERVER 
             
DIR_WS_CATALOG 
             
'product_info.php?products_id=' 
             
$pInfo->products_id 
# This line wrong:
#             . '"> 
# should be
             
'"> '
             
tep_image_button('button_preview.gif'IMAGE_PREVIEW
             . 
'</a>'
   
); 

Syntax highlighting makes it easy to see where you forgot to teminate strings, or terminated them early!
__________________
http://www.phptutorials.cjb.net. go on, give it a click!

Reply With Quote
  #3  
Old February 8th, 2005, 04:42 AM
vertmonkee vertmonkee is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 3 vertmonkee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m
Reputation Power: 0
Thanks very much, I shall try my best to keep things neater in the future, it will obviously help me out.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Help with an error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT