tqla Posted December 6, 2007 Share Posted December 6, 2007 This string works: if (isset($blank_array) && $_POST['answer'] == 'No') { ?> I'd like to add one more item to the ($blank_array) part called $bad_format. It should be of the 'or' type where it checks if any of them are set. I tried this: if (isset($blank_array || $bad_format) && $_POST['answer'] == 'No') { ?> but I got this error: Parse error: syntax error, unexpected T_BOOLEAN_OR, expecting ',' or ')' So I tried this: if (isset($blank_array or $bad_format) && $_POST['answer'] == 'No') { ?> And got another error. What am I doing wrong? ??? Link to comment https://forums.phpfreaks.com/topic/80514-solved-help-with-string-format/ Share on other sites More sharing options...
craygo Posted December 6, 2007 Share Posted December 6, 2007 try if((isset($blank_array) || isset($bad_format)) && $_POST['answer'] == 'No'){ Each variable need to have it's own function even if it is the same function. Ray Link to comment https://forums.phpfreaks.com/topic/80514-solved-help-with-string-format/#findComment-408195 Share on other sites More sharing options...
tqla Posted December 6, 2007 Author Share Posted December 6, 2007 Thank you craygo! That did it! Link to comment https://forums.phpfreaks.com/topic/80514-solved-help-with-string-format/#findComment-408243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.