Need script like nametests.com

@BaD_BoY_17 - It isn’t possible to see PHP in the browser. When a web page built with PHP is called, like “index.php”, the PHP compiles to Opcode and then machine code on the server. What is returned from that “program code” is HTML output and that is what one sees in the browser.

Scott

Yup, nope. I’m with Scott on this. I have never heard of a server side code being output to the screen other then escaping the < and >. I’m pretty sure @BaD_BoY_17 was explaining the HTML elements.

PHP starts with <?php** or **<?** (short-hand version) and ends with **?>.
HTML starts with <!DOCTYPE html> or <head> or <body>.

Any HTML codes within a PHP tag must either be between ?> and <?php, put inside a heredoc string, or required from a file. You can also use print and echo, but depending on which quotation mark you use, if you have HTML codes with the same marks, you have to escape them with a backslash.

So that being said. PHP will never be shown onto the screen unless you escape it or use it wrong.

There’s also the long version where it goes between <script language="php"> and </script> but no one uses that version because the shorter versions are so much easier to type. I haven’t seen anyone enable the other short-hand version either where it can go between <% and %>

The days of mixing program logic with HTML are hopefully long gone. But, oh wait. Yes. Almost forgot. Wordpress still does it. :anguished: LOL! Well, it allows it.

Scott

o. o I have never seen people stuff PHP codes inside ASP .NET codes. Is that even possible?

Off-topic: Now I am very curious. I know that Facebook uses multiple languages, but I never understand how they can integrate with each other like that. I thought you would get errors when you try to mix different server side languages together, even if you had a Linux box with a Windows box.

No it isn’t possible - you can use the tags either for ASP or for PHP but not both at the same time. There is a setting to turn it on for PHP but I don’t know why anyone would.

Yes, it would be like an act of heresy! Almost like <?hh :smiley: :smirk: :stuck_out_tongue:

Scott

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.