[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


php syntax

Posted on 2011-03-08
Medium Priority
Last Modified: 2012-05-11
I have this code:

<?      echo __('Oops, there is nothing in your cart.', 'wpsc') . " <a href='".get_option("product_list_url")."'>" . __('Please visit our shop', 'wpsc') . "</a>";

I need to wrap the phrase like this:

<div style = "margin-top:75px"> echo __('Oops, there is nothing in your cart.', 'wpsc') . " <a href='".get_option("product_list_url")."'>" . __('Please visit our shop', 'wpsc') . "</a>" </div>

but it has to be in PHP - I am having difficulty writing this. Can anyone help out?
Question by:lvollmer
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 11

Accepted Solution

Bruce Smith earned 2000 total points
ID: 35074754
Try the following code:  
echo('<div style = "margin-top:75px">');
echo __('Oops, there is nothing in your cart.', 'wpsc');
echo(' <a href="get_option(/'product_list_url/')">');
echo__('Please visit our shop', 'wpsc');

Open in new window


Author Closing Comment

ID: 35074783
LVL 11

Expert Comment

by:Bruce Smith
ID: 35074801
Sorry, line 3 should be this instead:
echo(' <a href="get_option(\'product_list_url\')">');

Open in new window

I got the slashes reversed.

Author Comment

ID: 35074838
yes i figured as much and made the change thank you!
LVL 11

Expert Comment

by:Bruce Smith
ID: 35074893
Cool, glad I could help!


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question