EllisLab text mark
Advanced Search
     
No echo or <?= !
Posted: 21 May 2012 10:41 AM
Avatar
Joined: 2012-05-21
72 posts

Is it possible that we use {$var} instead of

<? echo $var ?> 
 <?
$var ?> 
 
Posted: 21 May 2012 10:48 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-04-28
574 posts

You’re looking for a template system:

http://ellislab.com/codeigniter/user-guide/libraries/parser.html

Don’t forget to check out both the great CI user documentation
http://ellislab.com/codeigniter/user-guide
And google before posting on here. While we don’t mind helping people on this forum, we do expect them to try it for themselves first. A 10 second google hunt (I don’t know, how about searching for “codeigniter template system”) would have given you many results ready for you to explore!

 Signature 

My new website: www.downundr.com all about Australia, check it out!

Oh, and before you post a question on this forum have you searched for a solution on google? 90% of questions on here have already been answered!!!

 
Posted: 21 May 2012 10:52 AM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2012-05-21
72 posts

Which one is faster parser or echo?
Why most CMS user parser?

 
Posted: 21 May 2012 11:00 AM   [ # 3 ]   [ Rating: 0 ]
Joined: 2011-04-28
574 posts

Yawn… no thanks for answering your question - just another “give me the answer” post.

Here’s 2 ideas:
1. Learn some manners!
2. User your research skills and google it!

 Signature 

My new website: www.downundr.com all about Australia, check it out!

Oh, and before you post a question on this forum have you searched for a solution on google? 90% of questions on here have already been answered!!!

 
Posted: 21 May 2012 11:04 AM   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2012-05-21
72 posts

Thanks.
Although it look echo is faster, Parser make codes much readable and It is useful too!!!

 
Posted: 21 May 2012 11:49 AM   [ # 5 ]   [ Rating: 0 ]
Joined: 2011-04-28
574 posts

No worries. Yes, you are correct, using a template system will add overhead, but as you mentioned it has it’s benefits. It all comes down to your requirements. Good luck.

 Signature 

My new website: www.downundr.com all about Australia, check it out!

Oh, and before you post a question on this forum have you searched for a solution on google? 90% of questions on here have already been answered!!!

 
Posted: 21 May 2012 03:06 PM   [ # 6 ]   [ Rating: 0 ]
Joined: 2011-11-04
244 posts
boltsabre - 21 May 2012 11:00 AM

Yawn… no thanks for answering your question - just another “give me the answer” post.

Here’s 2 ideas:
1. Learn some manners!
2. User your research skills and google it!

lol

 
Posted: 21 May 2012 09:07 PM   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6583 posts
<?php echo $var?> 
 Signature 

Certified State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

Skype: insitfx

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View