Welcome Guest, Not a member yet? Register   Sign In
Can you insert an if condition in a view file?
#11

[eluser]titanite[/eluser]
Hi guys!

You were right, it was the short tags. I have learnt my lesson.. am not using short tags anymore. Once I change everything to below.. it worked like magic. I still don't know why some short tags work others don't.
But I will be using <?php from now on to ensure the portability of the code.

Code:
<title><?php echo "$info->title"; ?></title>
</head>
<body>
<h1>&lt;?php echo "$info->title"; ?&gt;</h1>
    
<h2>Title: &lt;?php echo "$info->title"; ?&gt;</h2>
<h2>Marketed title: &lt;?php echo "$info->title_marketed"; ?&gt;</h2>
<h3>Directed by: &lt;?php echo "$info->director_1"; ?&gt;&lt;?php if($info->director_2) { echo ", $info->director_2";} ?&gt;</h3>
<p>Review:</p>
<p>&lt;?php echo "$info->text;"?&gt;</p>


<p>Written by author &lt;?php echo "$info->author"; ?&gt;</p>
<p>on date &lt;?php echo "$info->date" ?&gt;</p>

Thanks for your help! Smile
#12

[eluser]The Wizard[/eluser]
[quote author="titanite" date="1271636231"]Hi guys!

You were right, it was the short tags. I have learnt my lesson.. am not using short tags anymore. Once I change everything to below.. it worked like magic. I still don't know why some short tags work others don't.
But I will be using &lt;?php from now on to ensure the portability of the code.

Code:
&lt;title&gt;&lt;?php echo "$info->title"; ?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
<h1>&lt;?php echo "$info->title"; ?&gt;</h1>
    
<h2>Title: &lt;?php echo "$info->title"; ?&gt;</h2>
<h2>Marketed title: &lt;?php echo "$info->title_marketed"; ?&gt;</h2>
<h3>Directed by: &lt;?php echo "$info->director_1"; ?&gt;&lt;?php if($info->director_2) { echo ", $info->director_2";} ?&gt;</h3>
<p>Review:</p>
<p>&lt;?php echo "$info->text;"?&gt;</p>


<p>Written by author &lt;?php echo "$info->author"; ?&gt;</p>
<p>on date &lt;?php echo "$info->date" ?&gt;</p>

Thanks for your help! Smile[/quote]

1. get a mac Smile
2. install mamp
3. install textmate
4. continue to use shorttagsSmile
5. take care!
#13

[eluser]cahva[/eluser]
Hehe.. Its really not a WAMP or XAMPP(or MAMP) issue. They all are just frontends to PHP and Mysql. They use the same PHP and Mysql binaries. All they do is install the software and write your config files for you so you dont have to edit those with a text editor(usually Smile ), nothing else.
#14

[eluser]cahva[/eluser]
[quote author="herrkaleun" date="1271636315"]
1. get a mac Smile
2. install mamp
3. install textmate
4. continue to use shorttagsSmile
5. take care![/quote]

You forgot:
3. BUY and install textmate

Tongue

Damn. Do I have to buy an expensive mac just to use short tags. LOL Smile
#15

[eluser]The Wizard[/eluser]
[quote author="cahva" date="1271638774"]Hehe.. Its really not a WAMP or XAMPP(or MAMP) issue. They all are just frontends to PHP and Mysql. They use the same PHP and Mysql binaries. All they do is install the software and write your config files for you so you dont have to edit those with a text editor(usually Smile ), nothing else.[/quote]

hell yess!!Smile
that IS the point.
in the apple world everything comes pre-configured (almost) and everything works out of the box!
so you don't have to tangle with the configs and stuff.
i love it!

good night everybody Smile
#16

[eluser]The Wizard[/eluser]
[quote author="cahva" date="1271638955"][quote author="herrkaleun" date="1271636315"]
1. get a mac Smile
2. install mamp
3. install textmate
4. continue to use shorttagsSmile
5. take care![/quote]

You forgot:
3. BUY and install textmate

Tongue

Damn. Do I have to buy an expensive mac just to use short tags. LOL Smile[/quote]

yes that's true!Smile))
i worked my hands off to get one, but now i do! It truely is amazing.
i can only recommend it to anyone!Smile

take care friends!
#17

[eluser]slowgary[/eluser]
herrkaleun makes commission on MacBook Pro sales!!!
#18

[eluser]The Wizard[/eluser]
[quote author="slowgary" date="1271666295"]herrkaleun makes commission on MacBook Pro sales!!![/quote]

Smile))
no i just recommend you what really is good. Smile




Theme © iAndrew 2016 - Forum software by © MyBB