Jump to content

A coding question using the 'if' command


blagger

Recommended Posts

Hi All

 

My first post here. I have an oscommerce website and am trying to do the following

 

www.deviltronics.com

 

I am trying to do something on my site so that when a certain products category is selected the product listing will display a certain text just under the header title on that page. Each category needs a to show different text.

 

So as example,

 

category with id 100 would display 'woohoo' where I want it

 

category with id 101 would display 'wow' where I want it

 

category with id 102 would display 'whoosh' where I want it

 

 

(those are just samples, I will actually include a paragraph or two.

 

Right you may laugh at this, but I am just having a play around, but this is the code I have come and with (obviously it doesn't work):

 

<?php

 

if ($current_category_id == '116') = ('text' => ['Some Text'])) ;  ;D

 

?>

 

Please tell me what it should be

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.