Jump to content


Photo

quick help


  • Please log in to reply
6 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 11 August 2006 - 09:13 PM

I need some very quick help.  I need to just figure out how to make text show, no matter what language.  It hink this is xhtml.  I want to be able to display code in a browser, no matter what language, asp, jsp, html, php, javascript, whatever
TO where when I write tutorials I can have code examples, and I want the code to print out to the screen without actually parsing, or running.  Advice anybody?
The reason I posted it in php, because I couldn't find anything relating to xhtml, that could do this, in php there is something called highlight so an entire page displays, but I don't know how to get code to display to the browser wherever I need for example code purposes.  I also may need to do this with asp, javascript or whatever else, and if I can find one way to output whatever to the browser, and ignoring it as a language it would be helpful.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 11 August 2006 - 09:21 PM

<pre>whatever</pre>

might help

Otherwise, convert < to & amp l t; and so on.
Legend has it that reading the manual never killed anyone.
My site

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 11 August 2006 - 09:25 PM

It didn't work, it still runs the script.  I mean like if I wanted to write a tutorial for javascript, ajax, php, sql, mysql, or something like asp, or even jsp, or xhtml, or something, I would want to be able to display the code.

Like on php freaks if you put in code block it preserves the code for php, and xhtml language, without running it, like a way to show an example like
<?php
echo "Hello World!";
?>
instead of outputing hello world, it says the actual code, I need a way to do this with any language, but I can't figure out anything.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 11 August 2006 - 09:25 PM

I don't think xhtml has the potential to do this, but I was thinking php might.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 11 August 2006 - 09:38 PM

Turn all of the "<" into &lt; the ">" into &gt; and it won't run.

Orio.
Think you're smarty?

(Gone until 20 to November)

#6 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 11 August 2006 - 09:40 PM

I am not trying to disable it from running necessarily, well I am, but I can't break the code.  I want a universal way to do it, are there any xhtml, or php tags to do it.  FOr instance, if you go to w3schools, they ahve tutorials in every language, ado, php, asp, javascritp, xhtml, xml.  For those languages they always have code snippets, and code examples, showing what the code looks like behind the scenes, what tags do they use to do that??

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#7 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 11 August 2006 - 10:29 PM

third time lucky?  Convert the < and > characters into their entity versions .... http://ca.php.net/ma...tmlentities.php
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users