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

x
?
Solved

php syntax

Posted on 2011-03-08
5
Medium Priority
?
417 Views
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>";
endif;
?>

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?
0
Comment
Question by:lvollmer
[X]
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
5 Comments
 
LVL 11

Accepted Solution

by:
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');
echo('</a></div>');

Open in new window

0
 

Author Closing Comment

by:lvollmer
ID: 35074783
thanks!
0
 
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.
0
 

Author Comment

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

Expert Comment

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

Cheers
0

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