Beginner question regarding Array's
Posted on
16th Feb 2014 07:03 pm by
admin
Hi everyone, the page im working on has an array of variable at the top...
Code: $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
I have written a statement to say if product_list_price is 0 dont display a buy now button..
Code: case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
if ($define_list['PRODUCT_LIST_PRICE']== '0'){ //fix for call for price
$lc_text = ' ';
} else {
$lc_text = osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $osC_Product->getKeyword() . '&' . osc_get_all_get_params(array('action')) . '&action=cart_add'), osc_draw_image_button('button_buy_now.gif', $osC_Language->get('button_buy_now'))) . ' ';
} break;
}
However its not working, Im unsure if its because my IF statement is correct or not, Ive read a few tutorials on google regarding it and im sure all the above code is correct, Can anybody tell me if theres something wrong or if it may be another matter?
No comments posted yet
Your Answer:
Login to answer
279
45
Other forums
Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email
if description does not contain the following words
Hello everyone,
I am parsing a MS Excel (.xls) file and adding it's content to a mySQL databa
form variables from database help.
Hi all,
I would like to have a form that gives you options based on the results of an mysql q
Displaying image pathname instead of image
Hello
Im trying to upload and then display images from a mysql database - Its only basic and
Am I setting up my sites oldschool?
Ok,
When I create a site I open a basic template that I have created that consists of a css f
How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [
Estimations and Effort
HI Gurus,
Would like to know whether SAP have a provision for carrying out the Project es
Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get
Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho
FILTER_CALLBACK -- Files?
Hi All,
I'm using the php filter functions to validate my form data. For custom filters, I'm