Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6044639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:02:04+00:00 2026-05-23T07:02:04+00:00

I keep getting this T_STRING Parse error im not sure what it is but

  • 0

I keep getting this T_STRING Parse error im not sure what it is but its on line 34 towards the bottom, any help is appreciated.

<form action="product_search">
<input type="text" name="search" value="<? echo htmlentities($_GET['search']); ?>"/>
<input type="submit" value="Search"/>
</form>
<?
$search_items = urlencode($_GET['search']);
// $search_items = 'eee';
$items = simplexml_load_file('http://api.shopping.com/dsp/linkin_id-8005272/keyword-'.$search_items);

if (($items) && (strlen($search_items) > 1)) {
print "<pre>\n";
foreach ($items->result->domain->{domain-listing} as $item) {
print l($item->title, $item->url)."<br/>";
}
print '</pre>';
}
else {
?>
Search for products-- computers, eee pcs, sub-notebooks, and all that great stuff!
<?
}
?>

<?
$tids = explode(',',arg(2));
foreach ($tids as $tid) {
$term_info = taxonomy_get_term($tid);
$search_items = urlencode($term_info->name);
$items = simplexml_load_file('http://publisher.api.shopping.com/publisher/3.0/rest/GeneralSearch?identity.apiKey=[API KEY]&tr.trackingId=[LINKIN ID]&nf.keyword='.$search_items);

if (($items) && (strlen($search_items) > 1)) {
foreach ($items->categories->category->items->offer as $item) {
print '<div style="float: left; width: 120px; padding: 10px; overflow: auto; display: block;">';
//right here is the error
print '<a rel="nofollow" onclick="javascript:_gaq.push(['_trackPageview', '/outgoing/article_exit_link/789591']);" href="'.$item->offerURL.'"><img src="'.$item->imageList->image[0]->sourceURL.'" width="100"></a>';
print "<br/>".l($item->name, $item->offerURL, array(), NULL, NULL, TRUE);
print '</div>';
}
}
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:02:05+00:00Added an answer on May 23, 2026 at 7:02 am

    You have to be careful with your single and double quotes. On that line, you have

    '<a rel="nofollow" onclick="javascript:_gaq.push(['
    

    That opens and closes your string. the _trackPageview then causes the error, as it is not part of the string.

    You can try something like (untested) below:

    print '<a rel="nofollow" onclick="javascript:_gaq.push([\'_trackPageview\', \'/outgoing/article_exit_link/789591\']);" href="\'.$item->offerURL.\'"><img src="\'.$item->imageList->image[0]->sourceURL.\'" width="100"></a>';
    

    By adding a \ before each ‘, you escape it so that it is considered part of your string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting the error Parse error: syntax error, unexpected T_STRING on line #9
I'm trying to use slime from CVS (2009-01-05) but keep getting this error: LOAD:
I'm trying to add an index to my models, but keep getting this error.
I'm trying to use getServletContext().getRealPath( / ) , but I keep getting this error:
I keep getting this error message and I don't understand why: src\Parsing.hs:21:18: parse error
I'm making a login script and I keep getting this error Parse error: syntax
I want to add this awk command on my script but keep getting error.
I want to rename a database, but keep getting the error that 'couldn't get
I keep getting the error Stream was not writable whenever I try to execute
I keep getting this puzzling error upon invocation of a one-way callback to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.