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?
PHP Arrays
Moderator: General Moderators
if you want the actual string use
if you want the result of the statement use
Code: Select all
$columnVal = array();
$columnValї] = '((isset($HTTP_POST_VARSї"firstname_sbd"]) ? $HTTP_POST_VARSї"firstname_sbd"] : null))';Code: Select all
$columnVal = array();
$columnValї] = ((isset($HTTP_POST_VARSї'firstname_sbd']) ? $HTTP_POST_VARSї'firstname_sbd'] : null));