View Full Version : Converting PHP to Html?

02-14-2006, 03:53 AM

I have this little piece of php code and was wondering if anyone knew some good converters or knows how. I am rather new at this but would like this to be used in a little project of mine.

Any insight or help would be great.


OPEN includes/functions_evo.php



function NetworkBar() {
$content .= "<script>\r\n";
$content .= "function change(url) {\r\n";
$content .= " if(url != \"\") {\r\n";
$content .= " location = url;\r\n";
$content .= " }\r\n";
$content .= "}\r\n";
$content .= "</script>\r\n";
$content .= "<table width=\"100%\" height=\"20\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n";
$content .= " <tr valign=\"middle\">\r\n";
$content .= " <td>\r\n";
$content .= " <a href=\"http://Evo-Links.com\" target=\"_blank\"><img src=\"images/evo-network.gif\" width=\"245\" height=\"20\" border=\"0\" alt=\"\"></a></td>\r\n";
$content .= " <td width=\"100%\" height=\"20\" align=\"right\" valign=\"middle\" background=\"images/evo-networkbg.gif\">\r\n";

$news = array();
$links = array();
$networkData = eval(@file_get_contents('http://Evo-Links.com/networkData.txt'));
$num = array_rand($news);
$nNews = $news[$num];
$nNews = explode('|', $nNews);
$title = $nNews[0];
$url = $nNews[1];
$content .= " <a href=\"" . $url . "\"><span style=\"color: #D4D4D4;\">" . $title . "</span></a> \r\n";
$content .= " <select style=\"background: rgb(52, 64, 85) none repeat scroll 0%; width: 230px; font-size: 11px; color: white; border-color: #D4D4D4;\" onChange=\"return change(this.options[this.selectedIndex].value);\">\r\n";
for($i=0,$maxi=count($links);$i<$maxi;$i++) {
$link = explode('|', $links[$i]);
$title = $link[0];
$url = $link[1];
$content .= " <option value=\"" . $url . "\">" . $title . "</option>\r\n";
$content .= " </select>\r\n";
$content .= " \r\n";
$content .= " </td>\r\n";
$content .= " </tr>\r\n";
$content .= "</table>\r\n";
$content .= "\r\n";
echo $content;

OPEN header.php


$news[] = "[Evo-Mods] MOD Database opened at Evo-Mods!|http://Evo-Mods.com/modules.php?name=Mods";
$news[] = "[Evo Release] Nuke-Evolution Basic 1.0.1|http://www.nuke-evolution.com/modules.php?name=Forums&file=viewtopic&t=3251";
$news[] = "[Evo-Themes] Themes for Nuke-Evolution|http://www.evo-themes.com/modules.php?name=Forums&file=viewforum&f=12";
$news[] = "[Security FIX] Nuke-Evolution Basic Exploit FIX|http://www.nuke-evolution.com/modules.php?name=Forums&file=viewtopic&t=4056";

$links[] = "Select an Evo Site|";
$links[] = "|";
$links[] = "Official Support Sites|";
$links[] = "------------------------------|";
$links[] = "Nuke-Evolution|http://Nuke-Evolution.com";
$links[] = "Nuke-Evolution Mods|http://Evo-Mods.com";
$links[] = "Nuke-Evolution Themes|http://Evo-Themes.com";
$links[] = "Nuke-Evolution Wiki|http://Evo-Docs.com";
$links[] = "|";
$links[] = "Multilingual Support|";
$links[] = "------------------------------|";
$links[] = "Nuke-Evolution Italia|http://Nuke-Evolution.it";
$links[] = "Nuke-Evolution German|http://Evo-German.com";
$links[] = "Nuke-Evolution Espanol|http://mundo-nuke.com";
$links[] = "|";
$links[] = "Sponsored Sites|";
$links[] = "------------------------------|";
$links[] = "Evo-Clans|http://Evo-Clans.com";
$links[] = "Evolution Art|http://www.nuke-evolution-art.com";

This is the original I found but like how it looks and would like for it to do the same in Html.

I am rather new to this stuff, but wanted some insight how I could get the same effect in Html.

Thanks. MR. Noob.

02-14-2006, 04:23 AM
Why not just echo it? PHP does get parsed as html.

02-14-2006, 04:32 AM
Like Aero just said. Just vist that page on whatever server it is on. View the source of the page and copy and paste it. Only the HTML will be outputted to your browser.

02-14-2006, 06:42 AM
Never thought about that...thank you. It worked, Im just sorta trying to learn myself. Remembering that will def help me.


Now I have the piece above and it works great. I also have it in subfolders one up from my root.

http://www.mysite.com/folder/html piece

Now when Im in the subfolder the links arent working that are on the same level.

http://www.mysite.com/folder/html piece1
http://www.mysite.com/folder/html piece2
http://www.mysite.com/folder/html piece3

When Im in 2 the link doesnt work for me to get to 3, or any combination.

Now Im guessing I have to add the echo tags but not sure where they go?

Am I correct on this or what to look for?

Thank you.