Page 1 of 1

what is <?=

Posted: Wed Aug 12, 2009 10:07 pm
by arminium
Hi guys

im a moderate level coder , and have come across a opening tag i have never seen before

it is in value=" here " feild of a php/html form

Code: Select all

<?=$MyData->Get('data');?>
Thanks

any help is muchg appreciated, as its special characters i can't search forums or google for it

J

Re: what is <?=

Posted: Wed Aug 12, 2009 10:20 pm
by aceconcepts
Hi arminium,

"<?=" is the shortcut syntax equvilent for "echo". However, it only works with the short open tag "<?"

Re: what is <?=

Posted: Wed Aug 12, 2009 10:28 pm
by arminium
so just to confirm

<?= is the same as <?php echo or <? echo

but it can not be <?php=


i sort of thought it might of been something like this

Thanks heaps

Re: what is <?=

Posted: Wed Aug 12, 2009 10:53 pm
by aceconcepts
That's correct - it can't be <?php=

For further info take a look at the PHP manual.

Re: what is <?=

Posted: Wed Aug 12, 2009 11:42 pm
by arminium
I had a good search and look last night but could night find any reference to it

Thanks for your help

i was looking for something else in the manual and just found this.

more info including the why and why nots of which to use is here

http://us2.php.net/manual/en/language.b ... hpmode.php

Jason

Re: what is <?=

Posted: Thu Aug 13, 2009 10:31 am
by aceconcepts
Look up echo in the manual.