Current location: Hot Scripts Forums » Programming Languages » PHP » Unexpected headache from unexpected "T String"


Unexpected headache from unexpected "T String"

Reply
  #1 (permalink)  
Old 09-28-06, 11:05 PM
dcshoeco1 dcshoeco1 is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Unexpected headache from unexpected "T String"

Ive been working on this for over a day now and its driving me nuts. I have a php website and under the english variable section I want to set up a page that describes to new subscribers what the benifets of my site are.

I keep getting unexpected t string in line 107

Line 107 reads like this

$SellerPayNowText = "<style type="text/css">



The Full Script reads like this
PHP Code:

<?php

/* $Id: eng.php,v 1.2.1 2006-06-26 09:57:48-07 brian Exp brian $ */
// vim: expandtab sw=4 ts=4 sts=4:
########################################################################
## Built2Go PHP RealEstate v1.0                                       ##
## ----------------------------------------------------------------   ##
## Copyright Đ Big Resources, Inc. All Rights Reserved.               ##
## This software must be used in accordance with its licensing        ##
## terms and conditions at: [url]http://www.built2go.com/faq.php[/url]           ##
##                                                                    ##
## This file may not be redistributed in whole or significant part.   ##
## ---------------- BUILT2GO IS NOT FREE SOFTWARE -----------------   ##
########################################################################
   
$name_of_site "TargetGo.com";
   
/*
    admin variables.
   */
   
$InvalidSiteID "Invalid User ID";
   
$SettingAddedSuccess "Your settings has been changed and you are being redirected to the Settings page";
   
$TemplateAddedSuccess "Your template has been changed and you are being redirected to the Template page";
   
$NoItemsToDisplay "No Items Found";
   
/*
    regular site variables
    */

    
$MessageSentSuccess "Message was sent successfully!";
    
$NoItems "No Items to Show";
    
$SameUseridError "I am sorry, there is already a user by that name you requested.<br /><br />Please try agian.";
    
$SameEmailError "I am sorry, there is already a user that has an email as the one you requested.<br /><br />Please try agian.";
    
$DisabledUser "Sorry, your account has been disabled by the <a href=\"mailto:$from_address\">Administrator</a>. please contact them if you have any questions. <br >";
    
$NotAuthorizedMember "Wrong userid or password.<br />Unfortunately,
     we didnīt find any users with the info you gave. If you are unsure of your real username or password, 
     you might go to  <a href='lookup.php'>Lookup page</a>, and supply your email address to
     receive registered information. "
;

    
$PendingSellerListing "Thank you for your submission. At this time our verification department has to verfiy the credibility of your listing. You still may add photos to this listing";
    
$InvalidPropertyID "Invalid Property ID entered";
    
$AlreadySavedListing "You already have that property saved in your saved listings";
    
    
// Contact page error
    
$ContactAlreadySent "You have already sent a contact message";
    
$EmptyMessage "Your Message was empty. Please type in something to say.";


    
    
/* newsletter variables */
    
$NoSubscriberFnd "I'm sorry but I didn't find any user by that name";
    
$NewsletterConmfirm "Thank you,<p>A confirmation message has been sent to <b>{EMAIL}</b><br />Please check your mail to complete the subscription process.";
    
$NewsAlreadySubscribe "Sorry,  but it appears that you have already subscribed to our updates with the email \"{EMAIL}\" that you supplied. ";
    
$Unsubscribe "Sorry to see you go,<p>A confirmation message has been sent to <b>{EMAIL}</b><br />Please check your mail to complete the subscription process.";
    
$NewsLetterIn "You have been added succesfully to our update news section";
    
$NewsLetterOut "You have sucessfully unsubscribed from our update news release.";

     
/*
     **** error messages ****
     // new user errors
     */
    
$RegistrationError[0] = "Please type in a userid.";
    
$RegistrationError[1] = "Please type in a password.";
    
$RegistrationError[2] = "Please type in a valid email address.";
    
$RegistrationError[3] = "Please type in a First Name.";
    
$RegistrationError[4] = "Please type in a street-address.";
    
$RegistrationError[5] = "Please type in your city.";
    
$RegistrationError[6] = "Please type in your state.";
    
$RegistrationError[7] = "Please type in your zipcode.";
    
$RegistrationError[10] = "Search Parameters Missing.";
    
$SameUseridError "I am sorry, there is already a user by that name you requested.<br /><br />Please try agian.";
   
$SameEmailError "I am sorry, there is already a user that has an email as the one you requested.<br /><br />Please try agian.";

    
$PasswordChangeSuccess "Your new password has been emailed to you.";
    
$SignupFailure "Please make a membership first by <a class=\"txt_link\" href=\"$siteurl/seller_signup.php\" class=\"text_dblue_bold\">Clicking here to join $name_of_site now!</a>";
    
$SignupSuccess "Thank you for singing up with Targetgo.com. Please wait while we forward you to your account page.<br />";
    
$SignupSuccessPaypal =  "<b>Your Account has been successfully Created. </b><br /> A receipt from Paypal has been
     emailed to you.<br /><p><span style=\"color:red\">Your account will be active as soon as our verification
     department has completed a review on your transaction. You will receive a welcome email as soon as
     this process is complete. We are working as quickly as possible please allow up to 12 hours for this to be complete</span>\n"
;
    
$SignupSuccessWorldpay =  "<b>Your Account has been successfully Created. </b><br /> A receipt from Worldpay has been
     emailed to you.<br /><p><span style=\"color:red\">Your account will be active as soon as our verification
     department has completed a fraud review on your transaction. You will receive a welcome letter as soon as
     this process is complete.</span>\n"
;
    
$SignupSuccess2checkout =  "<b>Your Account has been successfully Created. </b><br /> A receipt from 2Checkout has been
     emailed to you.<br /><p><span style=\"color:red\">Your account will be active as soon as our verification
     department has completed a review on your transaction. You will receive a welcome email as soon as
     this process is complete. We are working as quickly as possible please allow up to 12 hours for this to be complete</span>\n"
;
    
$AlreadySignedup "It appears that you have already submitted your membership.<br />";
    
$TansactionFail "There seems to have been a problem with your Transaction. If you have any questions please contact the admin about this delimma. <a href=\"{FROM}\">{FROM}</a>";

     
// Upload.php
    
$CopyFail "Sorry, Your image file failed to upload.";
    
$ToSmallUpload "<p><b>Error:</b><br />The picture you tried to upload is 0 kb
     in size. <a href=\"javascript:history.back();\">Go back.</a> and try again.</p>"
;
    
$ToBigUpload[0] = "<b>Error:</b><br />Picture you tried to upload, is to large > 50kb.
     Try to compress the image and try again.<p><a href=\"javascript:history.back();\">Go back.</a>"
;
    
$ToBigUpload[1] = "<b>Error:</b><br />Picture you tried to upload, is larger than ".MAXIMAGE_W_SIZE."x".MAXIMAGE_H_SIZE.".
     Try to compress the image and try again.<p><a href=\"javascript:history.back();\">Go back.</a>"
;
    
$NoPicture "No picture added, please try again.";
    
$upload_success "Thank you for your Photo submission.<br />
    Photo submissions may be reviewed by an administrator before they are added to our website.<br />Go back to <a class=\"text_dblue_bold\" href=\"member.php\">Members</a> Page<br /> "
;
    
$NotCorrectFormat "Sorry, we do not except that file type. Please retry your upload.";
    
// image format accepted
   
$ImageFormat = array("image/jpg","image/jpeg","image/png","image/gif","image/pjpeg");

   
$FailedFile ="File \"{IMG_UPLOAD}\" is not exceptable.";
   
$SuccessFile ="File \"{IMG_UPLOAD}\" has been uploaded.";


   
$SellerPayNowText "<style type="text/css">
<!--
.style2 {
    font-size: 24px;
    color: #000066;
}
-->
</style>
<table border="
0" cellpadding="0" cellspacing="0" width="600">
  <tbody>
    <tr>
      <td align="
left" valign="top" width="450"><p><span class="style2">Sell Your Home With TargetGo.com </span></p>
        <p><br>
          <img src="
http://images.apple.com/main/elements/spacer.gif" alt="aa" border="0" height="1" width="450"> </p></td>
      
<!--BEGING MIDDLE COLUMN SPACER-->
      <
td width="20">&nbsp;</td>
      <!--
END MIDDLE COLUMN SPACER-->
      <!-- 
START RIGHT COLUMN -->
      <
td align="left" valign="top" width="120"><img src="http://images.apple.com/main/elements/spacer.gif" alt="aa" width="20" height="8"><br></td>
    </
tr>
  </
tbody>
</
table>
<!-- 
START MAIN CONTENT -->
<
table border="0" cellpadding="0" cellspacing="0" width="458">
  <
tbody>
    <
tr>
      <!-- 
START LEFT COLUMN -->
      <
td align="left" valign="top" width="458"><p><strong>Save Money .</strong><br>
          
Meet people who share your interests and passionsFind a group of  friends with whom you can talk about the Mac or just hang outGo to a  monthly meeting or to special events.</p>
        <
p><strong>Global Exposure .</strong><br>
          <
span class="secondary_subtext">Expose your listings to more than 1.5 million TargetGo.com consumers 
worldwide
.The Ability to list detail to detail lets people find you easily</span></p>
        <
p><strong>Save money.</strong><br>
User group members receive exclusive benefits from a large number of  companies. As a user group memberyou can save money on software and  new and used hardware from many of the top vendors.</p>
        <
p><strong>Get your Asking Price &ampMaybe More</strong><br>
          <
span class="secondary_subtext">Consumers interested in your home listings will contact you directly
            
TargetGo.com will help you track these contacts and provide reports for you to pass along 
          to your customer
.</span></p>
        <
p><strong>Find local resources.</strong><br>
  
The Internet provides many answers and resourcesHowevernothing  beats the personal connection of meeting with local Mac users and  exploring the resources that are available locally &mdashfrom resellers to  technical support to community activities</p>
      </
td>
    </
tr>
  </
tbody>
</
table>;
   
$BuyerPayNowText "To Search or View Property Listings on $name_of_site, you must first subscribe. Please click the \"Make Payment\" link to the left.";
    
// Contact email
   
$ContactEmailSubject "$name_of_site Contact";

    
// email for when they first signup
    
$SignupEmail "Dear New Member,</p>
<p>Welcome to 
$name_of_site! We are excited to help you do more in the real estate marketplace.</p>
<p> Simply login to your account to find detailed  information instantly. You'll find everything from the exact features of homes , community information, social makeup,  and more.  </p>
<p>
$name_of_site also connects you with the top realtors in your area and homes in your price range. With the right combination of connecting you to a friendly realtor and the valuable  information on our website, we can help you find the perfect future home & sell your home easily. Make the home of your dreams a reality with $name_of_site!</p>
<p> Thank you, Below is your info.</p>
<p>User Name: {USERNAME}<br />
Password: {PASSW}</p>
<p> </p>
<p>Sincerely, The 
$name_of_site Team;</p>
<p> </p>
<p>TargetGo.com, PO Box 181, Brigantine, New Jersey, 08203</p>
<p> </p> "
;
    
$SignupEmailSubject "Welcome to $name_of_site ";
    
$SignupConfirmEmailSubject "$name_of_site Membership";
    
    
// email they get when renewing their membership after payment has been made
    
$SignupRenewConfirmEmail "Dear {NAME},<br /><br />Thank you for your renewal of a $name_of_site membership. Below are the details of your purchase:<br /><br />
    Price Paid: {PRICEPAID}<br />Name: {NAME}<br />Monthly membership: {MONTHLY} Months<br /><br />
    Once your purchase has been reviewed and approved by a staff member, your will be able to add your listing!<br /><br />Thank you again for your support<br /><br />Sincerely,<br /><br />The 
$name_of_site Team ";
    
$SignupRenewConfirmEmailSubject "$name_of_site Membership";

    

    
// email they receive when the photo was denied
    
$DeclineBuyerEmail "Dear {NAME},<br /><br />We are sorry to inform you that your photo was not accepted into the $siteurl for one of the following reasons:<br /><br />
    1. Unrelated Content<br />2. Unsuitable content (adult, vulgarities, hate, or other TOS violations)<br />3. Duplicate Submission<br /><br />
    Please correct the above before attempting to resubmit your photo.<br /><br />Sincerely,<br /><br />The 
$name_of_site Team ";

    
$DeclineOwnerEmail "Dear {NAME},<br /><br />We are sorry to inform you that your purchase was not accepted into the $siteurl for one of the following reasons:<br /><br />
    1. Unrelated Content<br />2. Unsuitable content (adult, vulgarities, hate, or other TOS violations)<br />3. Duplicate Submission<br /><br />
    Please correct the above before attempting to resubmit your purchase.<br /><br />Sincerely,<br /><br />The 
$name_of_site Team ";

    
$DeclinePropertyEmail "Dear {NAME},<br /><br />We are sorry to inform you that your photo was not accepted into the $siteurl for one of the following reasons:<br /><br />
    1. Unrelated Content<br />2. Unsuitable content (adult, vulgarities, hate, or other TOS violations)<br />3. Duplicate Submission<br /><br />
    Please correct the above before attempting to resubmit your photo.<br /><br />Sincerely,<br /><br />The 
$name_of_site Team ";

    
$DeclineBuyerEmailSubject "$name_of_site Buyer Denial";
    
$DeclineOwnerEmailSubject "$name_of_site Purchase Denial";
    
$DeclinePropertyEmailSubject "$name_of_site Property Denial";    

    
// email they get when the photo was approved
    
$GrantedPropertyEmail "Dear {NAME},<br /><br />We are pleased to inform you that your listign has been approved! You may now return to $siteurl. The details of your listings are below:<br /><br />
    Property ID: {PROPERTY_ID}<br />
    Property Url: 
$siteurl/property_detail.php?property_id={PROPERTY_ID}<br /><br />
    Your property is live on our 
$siteurl!<br /><br />Thank you for your support<br /><br />Sincerely,<br /><br />The $name_of_site Team ";

    
$GrantedOwnerEmail "Dear {NAME},<br /><br />We are pleased to inform you that you are approved owner! You may now return to $siteurl. You can list properties in the site<br /><br />
    Thank you for your support<br /><br />Sincerely,<br /><br />The 
$name_of_site Team ";

    
$GrantedBuyerEmail "Dear {NAME},<br /><br />We are pleased to inform you that you are approved member! You may now return to $siteurl. <br /><br />
    Thank you for your support<br /><br />Sincerely,<br /><br />The 
$name_of_site Team ";

    
$GrantedPropertyEmailSubject "$name_of_site Property Approved";
    
$GrantedOwnerEmailSubject "$name_of_site Property Approved";
    
$GrantedBuyerEmailSubject "$name_of_site Property Approved";        

    
// renew emails
    
$ORenew_Email_Today "Greetings, {NAME}, <br /> <br />Your $name_of_site membership has just expired! You may renew your membership for the same unbeatable price.  <br />Renew your membership at: <br /><a href='$siteurl/pay.php'>$siteurl/pay.php</a><br /> <br />We look forward to your continued membership<br /> <br />The $name_of_site Team<br />";
    
$ORenew_Email_Tomorrow "Greetings, {NAME}, <br /> <br />We are writing to inform you that your $name_of_site membership is set to expire tomorrow.  You may renew your membership for the same unbeatable price. <br /> <br />Renew your membership at: <br /><a href='$siteurl/pay.php'>$siteurl/pay.php</a><br /> <br />We look forward to your continued membership<br /> <br />The $name_of_site Team";
    
$ORenew_Email_Late "Greetings, {NAME}, <br /> <br />Your $name_of_site membership has just expired! You may renew your membership for the same unbeatable price.  <br />Renew your membership at: <br /><a href='$siteurl/pay.php'>$siteurl/pay.php</a><br /> <br />We look forward to your continued membership<br /> <br />The $name_of_site Team<br />";
    
$BRenew_Email_Today "Greetings, {NAME}, <br /> <br />Your $name_of_site membership has just expired! You may renew your membership for the same unbeatable price.  <br />Renew your membership at: <br /><a href='$siteurl/buyer_pay.php'>$siteurl/buyer_pay.php</a><br /> <br />We look forward to your continued membership<br /> <br />The $name_of_site Team<br />";
    
$BRenew_Email_Tomorrow "Greetings, {NAME}, We are writing to inform you that your $name_of_site membership is set to expire tomorrow.  You may renew your membership for the same unbeatable price. <br /> <br />Renew your membership at: <br /><a href='$siteurl/buyer_pay.php'>$siteurl/buyer_pay.php</a><br /> <br />We look forward to your continued membership<br /> <br />The $name_of_site Team";
    
$BRenew_Email_Late "Greetings, {NAME}, <br /> <br />Your $name_of_site membership has just expired! You may renew your membership for the same unbeatable price.  <br />Renew your membership at: <br /><a href='$siteurl/buyer_pay.php'>$siteurl/buyer_pay.php</a><br /> <br />We look forward to your continued membership<br /> <br />The $name_of_site Team<br />";
    
$ExpiredEmailSubject "$name_of_site membership Account Expired";
    
$ExpirationEmailSubject "$name_of_site membership Expiration Notice";
    
/*
      Newsletter email
      {UPDATES} AND {TIMEFRAME} are variables. please do not remove or the newsletter will not be sent correctly.
    */
    
$NewsletterEmail "Greetings, <br /><br />These are the updates for {TIMEFRAME} <br />on
    
$name_of_site<br /><br />{UPDATES}<br /><br />-------------------------------<br />To unsubscribe,
    just login to your members section and uncheck the appropriate box<br /><a href='
{$siteurl}/buyer_login.php'>$siteurl/buyer_login.php</a><br />
    OR<br />
    If you subscribed with your email, just enter it here to unsubscribe<br /><a href='
{$siteurl}/optinout.php?action=signout'>$siteurl/optinout.php?action=signout</a>
    <br />
    <br />Sincerely,<br /><br />
$name_of_site team";
    
    
// email they get for newsletter OPT IN
    
$NewsletterEmailOpt "Greetings,<br /><br />Thank you for your subscription of our Quartley Newsletter. <br /><br />
    To finish the subscription process please click on the link below. if this is not meant for you then just disregard
    this email and you will never here from us again.<br /><br />
    Click below:<br />
    <a class=\"txt_grey\" href=\"
$siteurl/optinout.php?do=in&id={ID}\">$siteurl/optinout.php?do=in&id={ID}</a><br /><br />

    Keep a watch out for our next edition.<br /><br />
    Sincerely,<br /><br />The 
$name_of_site Team ";
    
$NewsletterEmailOptSubject "$name_of_site Newsletter Subscription";

    
// email they get for newsletter OPT OUT
    
$NewsletterUnsubEmail "Greetings,<br /><br />We are sorry to see you unsubscribe from our Quartley Newsletter. <br /><br />
    To finish the UnSubscribe process please click on the link below. if this is not meant for you then just disregard
    this email and you will not be unsubscribed.<br /><br />
    Click below:<br />
    <a class=\"txt_grey\" href=\"
$siteurl/optinout.php?do=out&id={ID}\">$siteurl/optinout.php?do=out&id={ID}</a><br /><br />

    Keep a watch out for our next edition.<br /><br />
    Sincerely,<br /><br />The 
$name_of_site Team ";
    
$NewsletterUnsubEmailSubject "$name_of_site Unsubscribe Confirmation";

     
// forgotten password
    
$LookupEmail "Hi {NAME}  <br />
         It appears you have requested your password. The high security nature of this site we\n
         can't give you the password seeing how it is encrypted. therefore we have a made a temporary
         password. <br /> <br />Here is your new password that you requested. <br />
         It is recommended you change it to one of your liking. <br /> <br />
         New Passowrd: {NEWPASSW} <br /> <br />
         You can login here: <a href=\"
$siteurl\">$siteurl</a> to make the changes.
         <br /><br />Sincerely,<br /><br />The 
$name_of_site Team<br />";


    
$LookupEmailSubject "$name_of_site Information Request";
    
$monthhash   = array("January"=>"01""February"=>"02""March"=>"03""April"=>"04""May"=>"05""June"=>"06""July"=>"07""August"=>"08""September"=>"09""October"=>"10","November"=>"11""December"=>"12");
    
$Months = array("Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec");
    
$types_array=array("jpg","jpeg","gif","png");


?>
Can someone give me some insight please?

Last edited by nico_swd; 09-29-06 at 02:10 AM.
Reply With Quote
  #2 (permalink)  
Old 09-28-06, 11:17 PM
Keith's Avatar
Keith Keith is offline
Community Liaison
 
Join Date: Feb 2004
Posts: 1,232
Thanks: 1
Thanked 11 Times in 11 Posts
Seriously? The problem practically points itself out.

Take the string (starting at line 107), and end it with a double-quote. Then comment out all double-quotes inside the string (ie: change all " to \").

You're getting the error on line 107 because that's the first time an uncommented doube-quote shows up inside a double-quoted string, but there are a bunch of double-quotes in there that need commenting.

Or you can start and end with single-quotes and you don't need to comment the doube-quotes... but then you'd need to comment any single-quotes.

Or, you can use a heredoc and not worry about single- or doube-quotes:
PHP Code:

$SellerPayNowText = <<<SELLERPAYNOWTEXT

<style type="text/css">
<!--
.style2 {
font-size: 24px;
color: #000066;
}
-->
</style>
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tbody>
<tr>
<td align="left" valign="top" width="450"><p><span class="style2">Sell Your Home With TargetGo.com </span></p>
<p><br>
<img src="http://images.apple.com/main/elements/spacer.gif" alt="aa" border="0" height="1" width="450"> </p></td>
<!--BEGING MIDDLE COLUMN SPACER-->
<td width="20">&nbsp;</td>
<!--END MIDDLE COLUMN SPACER-->
<!-- START RIGHT COLUMN -->
<td align="left" valign="top" width="120"><img src="http://images.apple.com/main/elements/spacer.gif" alt="aa" width="20" height="8"><br></td>
</tr>
</tbody>
</table>
<!-- START MAIN CONTENT -->
<table border="0" cellpadding="0" cellspacing="0" width="458">
<tbody>
<tr>
<!-- START LEFT COLUMN -->
<td align="left" valign="top" width="458"><p><strong>Save Money .</strong><br>
Meet people who share your interests and passions. Find a group of friends with whom you can talk about the Mac or just hang out. Go to a monthly meeting or to special events.</p>
<p><strong>Global Exposure .</strong><br>
<span class="secondary_subtext">Expose your listings to more than 1.5 million TargetGo.com consumers 
worldwide.The Ability to list detail to detail lets people find you easily</span></p>
<p><strong>Save money.</strong><br>
User group members receive exclusive benefits from a large number of companies. As a user group member, you can save money on software and new and used hardware from many of the top vendors.</p>
<p><strong>Get your Asking Price &amp; Maybe More</strong><br>
<span class="secondary_subtext">Consumers interested in your home listings will contact you directly. 
TargetGo.com will help you track these contacts and provide reports for you to pass along 
to your customer.</span></p>
<p><strong>Find local resources.</strong><br>
The Internet provides many answers and resources. However, nothing beats the personal connection of meeting with local Mac users and exploring the resources that are available locally &mdash; from resellers to technical support to community activities</p>
</td>
</tr>
</tbody>
</table>
SELLERPAYNOWTEXT; 
__________________
The toxic ZCE

Last edited by Keith; 09-28-06 at 11:25 PM.
Reply With Quote
  #3 (permalink)  
Old 09-28-06, 11:29 PM
dcshoeco1 dcshoeco1 is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Im very very inexperienced, could you dumb it down for me
Reply With Quote
  #4 (permalink)  
Old 09-29-06, 01:04 PM
Trevor's Avatar
Trevor Trevor is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Denver, Colorado
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Basically, your content needs to be "escaped". Or is that \"escaped\".

When a variable holds a string, or whatever... you need to have a way of saying *THIS* is what this variable holds. To do that, you surround your string in quotes.

$me = "work from home today";

If the string itself has quotes within it:

$me = "work from "home" today";

PHP thinks the $me variable is equal to :

$me = "work from "

This causes 2 problems. 1st, the end of line ";" is no where to be had. 2nd, there is now some extra stuff floating around (home" today" that PHP doesn't know what do with. The 1st problem will toss an unexpected T String error. The 2nd problem... goes to the dentist and gets all his teeth ripped out...

To make $me work, you have to escape the inner quotes.

$me = "work from \"home\" today";

The \ mark escapes any special character that is inside the string.

--- GOT IT?

You can also surround a string with ' (single quotes).

$me = 'work from "home" today';

In this case you do not need to escape the double quotes because the single quote represents the beginning and ending of your value. If you value has a single quote within it's content, and you use single quotes to 'contain' the content, then it will need to be escaped.

$baby = 'It\'s a boy!';

In a nutshell, if you use double, or single, quotes to "contain" your value, you need to escape \ any occurance of the same within the content.

--- <<<EOC

The third option is to contain the content within a multi-line container.

$me = <<<EOC : Is telling PHP to read in the contents of the following lines until you reach the finishing string of EOC. In Keith's description he used SELLERPAYNOWTEXT as the finishing string.

The reason for using this third method is because it does not force you to escape each and every single and/or double quote. When you are dealing with a chunk of content such as that that is being stored in the $SellerPayNowText variable, escaping each and every " mark would be a pain in the second toe to your left on the right foot.

My suggestion : Remove lines 107 to 150 and replace it with the PHP code Keith provided. If you decide to stick with the current format, you will have to escape all the double quotes between lines 107 and 150. You will also need to add one more double quote right before the ; mark on line 150 as it is missing.

I hope this helps.
__________________
The Universe Our God, Nature Our Temple, Love And Duty Our Religion, Knowledge Our Happiness And Consolation, Death The Dissolution Of The Ego, And The Return To Eternity.
Reply With Quote
  #5 (permalink)  
Old 09-29-06, 02:36 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by dcshoeco1
Line 107 reads like this

$SellerPayNowText = "<style type="text/css">
$SellerPayNowText = "<style type=\"text/css\">";
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 05:41 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.