• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2868
  • Last Modified:

PHP open tag -- and close????

In response to a tech ticket, I got this response from the tech person:

the PHP function that calls the editor is set up wrong in your template.

It's the following function:

if ($my->id) {
     initEditor();
}

This must be inside a PHP open tag.

So my question here, is how to I put the above code inside a PHP open tag (and I assume I need a way to close it?????

You can see I am very basic in php! :)

Thanks

Rowby
0
Rowby Goren
Asked:
Rowby Goren
4 Solutions
 
steelseth12Commented:
<?


if ($my->id) {
     initEditor();
}


?>

the page extension also needs to be .php
0
 
gamebitsCommented:
Just to add a bit

Some server required the open tag to be <?php
0
 
Rowby GorenAuthor Commented:
ok  gamebits -- I will try that because i think it needs it in my case.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
hernst42Commented:
A closing tag at the end of the file is not needed and can lead (in some cases) to problems. So if no other html comes at the end just leave the closing tag away.
0
 
NovitshCommented:
To save kilobytes just use this:


<? if ($my->id){initEditor();} ?>

:-)
0
 
Rowby GorenAuthor Commented:
Thanks all!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now