Hi everyone! Now everyone knows you define a PHP script like this:
However, I recently learnt that there is another way to achieve this - like this:Code:<?php echo "Hello World"; ?>
It's not much of a tutorial, but I just thought it was interesting to show.Code:<script language="php">echo "Hello World";</script>
![]()
looking good..
thanks dude![]()
Nice information to know! Thanks! +rep
I've found another way to define it - and this time it's simpler than normal!
The usual way:
The SHORT way:Code:<?php echo "Hello World"; ?>
So if you drop the "php" from your scripts, and you write 100 scripts, you'll save yourself from typing 300 extra keys... that's gotta be worth it, no?Code:<? echo "Hello World"; ?>
Well, for the short way to work you must enabled short_tags in your PHP configuration file![]()
Also if you want a quick way to echo something.. Like in a value
ie:soCode:<input value="<?='hey';?>">
is the quick way xDCode:<?="hey";?>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks