•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 426,447 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,218 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1639 | Replies: 1
![]() |
•
•
Join Date: May 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
ok, i'm really new to php, and i was trying to edit some text, and after i changed it i musta screwed something up because now i get a parse error unexpected t_string line 23, here is the code...
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: index.php 290 2004-09-15 19:48:26Z wilt $
//
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');
// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}
Please help me... i need to get my page back up...
Thanx
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: index.php 290 2004-09-15 19:48:26Z wilt $
//
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');
// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}
Please help me... i need to get my page back up...
Thanx
•
•
Join Date: May 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');
You need to replace the ' above with \'.
Why? Well, this is because you are typing a string in PHP, using single quotes to tell PHP where the string starts and ends. The problem is... PHP sees your string above seems to end early, just after can , and then sees a lot of random characters afterwards that it doesn't understand.
By adding a \ in front of the ' in the string, you are telling PHP that the ' doesn't end the string. So it continues reading on until the end.
Hope that helps!
Peter
You need to replace the ' above with \'.
Why? Well, this is because you are typing a string in PHP, using single quotes to tell PHP where the string starts and ends. The problem is... PHP sees your string above seems to end early, just after can , and then sees a lot of random characters afterwards that it doesn't understand.
By adding a \ in front of the ' in the string, you are telling PHP that the ' doesn't end the string. So it continues reading on until the end.
Hope that helps!
Peter
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Help. Parse error in PHP code (PHP)
- PHP Parse error: parse error, unexpected T_STRING (PHP)
- Parse error: parse error, unexpected T_STRING in /home/thei2k9/public_html/includes/f (PHP)
- Parse Error message when testing page on browser - HELP!! (PHP)
- Parse error: (PHP)
- I need help with a parse error! (PHP)
- Parse error, syntax error, Forbids declaration (C++)
Other Threads in the PHP Forum
- Previous Thread: Search two tables
- Next Thread: Purchase order system


Linear Mode