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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.