I have a view file that is being loaded with this:
$this->output->set_template('default3');
inside default3 I have this bit of code.
<?php
if ($_GET['typo']=="PHARMA"){
echo '<script type="text/JavaScript">
<img src="<?php echo base_url(); ?>assets/themes/default/images/new_blue_logo_sub240x240.png" style="float:left;margin-top:5px;z-index:5" alt="logo"/>
</script>;
}
if ($_GET['typo']=="SOFTWARE"){ <<this line is causing the error
echo '<script type="text/JavaScript">
<img src="<?php echo base_url(); ?>assets/themes/default/images/output-onlinepngtools (8).png" style="float:left;margin-top:5px;z-index:5" alt="logo"/>
</script>;
};
?>
I am trying to get either one of those two images to appear. But the second $_GET causes an error:
Message: syntax error, unexpected 'typo' (T_STRING), expecting ',' or ';'
Why is this?
proof that an old dog can learn new tricks