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
https://forums.phpfreaks.com/topic/179562-add-image/
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
https://forums.phpfreaks.com/topic/179562-add-image/#findComment-947528
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
https://forums.phpfreaks.com/topic/179562-add-image/#findComment-947535
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.