- Posts: 4
COMMUNITY FORUM
PHP Code item.php
- Stephan Wäsche
-
Topic Author
- Offline
- New Member
Less
More
12 years 6 months ago - 12 years 6 months ago #105551
by Stephan Wäsche
PHP Code item.php was created by Stephan Wäsche
I need your help. I want to display different titles for the extra fields description by categories. i've tested the following code but it dosn't work
<?php if($catid == 17)
{
echo 'Titel 1';
}
else if($catid == 20)
{
echo 'Titel 2';
}
else
{
echo 'Titel 3';
}
?>
Please Log in or Create an account to join the conversation.
- Stephan Wäsche
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 6 months ago #105552
by Stephan Wäsche
Replied by Stephan Wäsche on topic Re: PHP Code item.php
The following code also dosn't match. :(
<?php if($catid = "17")
{
echo 'Titel 1';
}
else if($catid = "20")
{
echo 'Titel 2';
}
else
{
echo 'Titel 3';
}
?>
Please Log in or Create an account to join the conversation.
- Vinodkumar Saravana
-
- Offline
- New Member
Less
More
- Posts: 1
12 years 6 months ago #105553
by Vinodkumar Saravana
Replied by Vinodkumar Saravana on topic Re: PHP Code item.php
this wil work...check again...
Please Log in or Create an account to join the conversation.
- Stephan Wäsche
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 6 months ago #105554
by Stephan Wäsche
Replied by Stephan Wäsche on topic Re: PHP Code item.php
Thanks for your answer but it doesn't work. It only shows Title 1 on all pages.
Please Log in or Create an account to join the conversation.
- Stephan Wäsche
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 6 months ago #105555
by Stephan Wäsche
Replied by Stephan Wäsche on topic Re: PHP Code item.php
I've found the solution.
Log in or Create an account to join the conversation.