Welcome Guest, Not a member yet? Register   Sign In
display without using echo
#1

[eluser]nubianxp[/eluser]
Quote:Is there a way to show data without using "echo"?
for example, instead of:

Code:
<title><?php echo $site_name; ?></title>

I could just:

Code:
<title><?php $site_name; ?></title>

BTW, this is NOT the same as
Code:
<?=$site_name?>
.

Oops! Disregard the question above, looking at it again I think
I got my logic wrong. LOL

I was thinking in a WordPress kind of way. I forgot that it uses
functions for that which is bloginfo(), IIRC.

Thanks for the reply and sorry for the mess. Smile
#2

[eluser]Adamcbrz[/eluser]
Well, I am not sure what you are trying to accomplish.

The point of have the echo is to know that you want to output the variable otherwise you would out put every php variable with in you website.

What is the point in not using the echo? If you just want to have short hand i think the Template Engine for CI might work.

-Adam
#3

[eluser]stuffradio[/eluser]
You could go

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

I really don't understand what you're trying to do. There is no way to output variable values without using "print" or "echo" or the other way I mentioned... not that I have heard of anyways, but there is nothing being saved by not writing "echo".




Theme © iAndrew 2016 - Forum software by © MyBB