what is <?=

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
arminium
Forum Newbie
Posts: 18
Joined: Wed Aug 12, 2009 10:02 pm
Location: Sunshine Coast, AUSTRALIA!!!!!!

what is <?=

Post 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
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: what is <?=

Post by aceconcepts »

Hi arminium,

"<?=" is the shortcut syntax equvilent for "echo". However, it only works with the short open tag "<?"
User avatar
arminium
Forum Newbie
Posts: 18
Joined: Wed Aug 12, 2009 10:02 pm
Location: Sunshine Coast, AUSTRALIA!!!!!!

Re: what is <?=

Post 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
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: what is <?=

Post by aceconcepts »

That's correct - it can't be <?php=

For further info take a look at the PHP manual.
User avatar
arminium
Forum Newbie
Posts: 18
Joined: Wed Aug 12, 2009 10:02 pm
Location: Sunshine Coast, AUSTRALIA!!!!!!

Re: what is <?=

Post 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
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: what is <?=

Post by aceconcepts »

Look up echo in the manual.
Post Reply