Welcome Guest, Not a member yet? Register   Sign In
Problem in a echo condition
#1

[eluser]SpiderXP[/eluser]
in my view file I write the normal coding of echo condition
Code:
<title><?php echo $title; ?></title>

but in the CI tutorial write the echo condition replaces the =

Code:
<title><?=$title?></title>

and execute the code in title print the coding
Code:
<?=$title?>

and this is a controller file
Code:
<?php
class Blog extends Controller {

function Blog()
    {
        parent::Controller();
        
        $this->load->scaffolding('entries');
    }

    function index()
    {
        $data['title']="My Blog Title";
        $data['heading']="My Blog Heading";
        $data['todo'] = array("Clean House","Eat Lunch","Call Mom");
            
        
        $this->load->view('blog_view', $data,);
    }
}


/* End of file blog.php */
/* Location: ./system/application/controllers/blog.php */
Please guide me
Confusedmirk:
#2

[eluser]Clooner[/eluser]
What exactly is the problem/question?
#3

[eluser]InsiteFX[/eluser]
Code:
// This is wrong:
// This is the title of the web page!
<title><?php echo $title; ?></title>

// If you want to display this you just write:
<?php echo $title; ?>

InsiteFX
#4

[eluser]minerbog[/eluser]
Not sure what your asking but if your have problems with the short tag <?=$something?>, it could be that your server doesn't support short tags, or they are not configured in your php.ini file.
#5

[eluser]SpiderXP[/eluser]
I am very very thankful to you Sir you are correct. I Changed the version of xampp then echo short tag is run perfectly.
very very thankyou.
Smile




Theme © iAndrew 2016 - Forum software by © MyBB