473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Difference between <?php ?> and <? ?>

78
anybody can pls tell me what is the difference between using <?php ...?> and <?...?> tags in php
Dec 7 '11 #1
2 897
johny10151981
1,059 1GB
<?...?> is called short tag. If you use short tag you would be able to write php code in short tag. it also can used in HTML TAG. as example
Expand|Select|Wrap|Line Numbers
  1. <INPUT TYPE='text' value=<?=$value?>>
  2.  
But If you want to use a combination of other non php tag it would conflict such as
<?xml ?>

but you can achieve it anyway
Dec 7 '11 #2
AutumnsDecay
170 100+
To expand on Johny's comment, some servers (Mainly apache) will initiate a PHP code block when <? ?> is used, however, Windows-based servers require <?php ?> tags.
Dec 8 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: haoren | last post by:
Can anybody help me with this problem: How can I echo a string that contain <? and <?php? For example, $str="test <? and <?php echo"; echo $str;
13
by: dpj5754 | last post by:
Is there a simple and determinist way to make the difference between the 2 sequences: <XX></XX> and <XX/> The EndElement callback does not provide this information.
4
by: matatu | last post by:
Hi to all, I have a xml file, a substring like: &lt;a href=&quot;#&quot;&gt;text&lt;/a&gt; which after an xslt trasform is rendered as (using xsl:output method html): &lt;a...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
2
by: Fredrik Melin | last post by:
Hi, I have a vendor that requires me to send empty value, e.g. <OrderIDInfo /> problem is that my xslt need to add attributes, doing this <OrderIDInfo> <xsl:attribute name="orderID">...
3
by: Henry Johnson | last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out how to programmatically populate a table cell as follows (from C# code-behind)? I've tried using a Literal control in the...
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
6
by: tentstitcher | last post by:
Hi all: I have a source xml document with an element of type string. This element contains something like the following: <stringData> &lt;Header&gt; &lt;Body&gt; </stringData> I would like to apply an...
8
by: ajc308 | last post by:
I am using C# to transform an XML document which actually outputs another XML document using XslCompiledTransform and an XmlTextWriter. The code I am using is: XslCompiledTransform myXslTrans...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.