PHP Arrays
Posted: Tue Nov 09, 2004 4:45 am
I have a strange problem with an array, i would like to add the following as a single element in an array.
$columnVal = array();
$columnVal[] = "((isset($HTTP_POST_VARS['firstname_sbd]') ? $HTTP_POST_VARS['firstname_sbd'] : null))";
However this causes the page to fail to load, however if you remove the ' from the post var, the page loads but the code dosnt work, eg
['firstname_sbd'] to [firstname_sbd]
Is there a way to add the string to the array?
$columnVal = array();
$columnVal[] = "((isset($HTTP_POST_VARS['firstname_sbd]') ? $HTTP_POST_VARS['firstname_sbd'] : null))";
However this causes the page to fail to load, however if you remove the ' from the post var, the page loads but the code dosnt work, eg
['firstname_sbd'] to [firstname_sbd]
Is there a way to add the string to the array?