Jump to content

Add Image


jrp91384

Recommended Posts

Hello,

 

Could someone please tell me how to add an image within my list items? I don't know how to code the file path within a function.

 

Any help is greatly appreciated!!!

Thank you

 

 

function vis_page_overview() {
echo '
<div class="wrap">
     <p id="icon-edit" class="icon32"><h2>xxx Center Overview</h2></p>
 <p>Below you will find instructions on how to perform common tasks that are specific to your site.</p>
     <div id="vis-box-1" class="vis-boxes">
   <div class="box-heading">Quick Links - General</div>
   <ul>
         <li><a href="?page=definitions">Definitions</a></li>
         <li><a href="?page=pages#edit-page">Edit - Page</a></li>
         <li><a href="?page=pages#add-page">Add - Page</a></li>

 

 

Link to comment
Share on other sites

Okay..

Here are some examples

$Var = "Testing<BR />\n"
echo "1 here is a quote \" and a single quote '  $Var";
echo '2 here is a quote " and a single quote \'  $Var';
echo '3 here is a quote " and a single quote \'  '.$Var;

 

1 = this uses double quotes thus i escape the double quotes inside (\")

2 = this uses single quotes thus i escape the single quotes inside (\') BUT notice that $Var doesn't get parsed, this is because variable don't get parsed inside single quotes

3 = same as 2 BUT i moved $Var outside the quotes by concatenation (the dot .  joins then)

 

I Hope that helps

Link to comment
Share on other sites

I personally prefer method three for two reasons:

 

1) Using single quotes and concatenating variables processes faster than using double quotes and including variables.

2) It is easy to miss variables that are included in strings when you go back and look at code. This can make debugging difficult.

Link to comment
Share on other sites

It's not really. We are talking microseconds! But, I'm still a purest that way - old habits die hard!

 

That being said, I think my second argument towards it was the main reason I prefer to concatenate variables - I just find it easier to debug code. But, they all work fine.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.