• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 409
  • Last Modified:

browser links

foreach($orders as $orders){
echo '
<a href=\'
https://sellercentral-europe.amazon.com/gp/orders-v2/details?ie=UTF8&orderID='
.$orders['orderid'].'\'>'.$orders['orderid'].'</a>'
;

echo '
<a href="
https://sellercentral-europe.amazon.com/gp/orders-v2/details?ie=UTF8&orderID='
.$orders['orderid'].'">'.$orders['orderid'].'</a>'
;

}


want to make html href links


this code is just making
<a href=' https://sellercentral-europe.amazon.com/gp/orders-v2/details?ie=UTF8&orderID=403-2206310-81283'>403-2206310-81283</a> <a href=" https://sellercentral-europe.amazon.com/gp/orders-v2/details?ie=UTF8&orderID=403-2206310-81283">403-2206310-81283</a>


i want links in html when run on a browser
0
rgb192
Asked:
rgb192
  • 3
  • 2
  • 2
1 Solution
 
hieloCommented:
change < to <
and also > to >
foreach($orders as $orders){
echo '
<a href=\'
https://sellercentral-europe.amazon.com/gp/orders-v2/details?ie=UTF8&orderID='
.$orders['orderid'].'\'&gt;'.$orders['orderid'].'</a>'
;

echo '
<a href="
https://sellercentral-europe.amazon.com/gp/orders-v2/details?ie=UTF8&orderID='
.$orders['orderid'].'"&gt;'.$orders['orderid'].'</a>'
;

}

Open in new window

0
 
hieloCommented:
I meant:
change &lt; to <
and also &gt; to >

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
You need to use a text editor or HTML/code editor and change the HTML entities like < to the characters that are needed for the links to work.  HTML entities are character sequences used to display characters that HTML would otherwise use to decide how to display the page.  In your sample above, you need to replace < with < and > with > and your links will work in a web page.
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Dave BaldwinFixer of ProblemsCommented:
Well, that ended up not working well.  I'll have to put spaces between the character sequences for this to display properly.  Change "& l t ;" to "<" and "& g t ;" to ">" in your code editor.
0
 
rgb192Author Commented:
applied your change

I am only getting links for urls that have no (null) orderid

0
 
rgb192Author Commented:
now it works... thanks
0
 
Dave BaldwinFixer of ProblemsCommented:
The $orders['orderid'] part is a PHP variable that needs to be filled in by the PHP code... which means this needs to be a *.php page, not a *.html page.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now