Hi Everyone...
I am trying to do some Object calls within a PHP script which is INLINE within HTML. However the "->" PHP syntax is effectively closing the <?php start tag. How do I escape this syntax within the PHP to ensure the browser doesn't perceive it as a tag end?
Example:
blah........
<body>
<?php
if($thisUser->is_logged_in()){
$output='Welcome'
}
print $output;
?>
</body>
blah.........
The ">" of the "->" in $thisUser->is_logged_in() object call
, causes the <?php to close. So what it renders to screen is straight text:
is_logged_in()){$output='Welcome'}print $output;?>
What is the best solution?
1 - Can I escape the ">"
2 - Would it make any difference if I abstracted the PHP into an seperate file?
3 - Is there another method for calling Object functions?
Cheers,
Todd