chrisMartin Posted November 19, 2009 Share Posted November 19, 2009 Is anything like this allowed: <?php if(file_exists("func1(parameter).'/images/'.func2(parameter)")) { // do some stuff } ?> I'm trying to use a few Wordpress directory/path functions in a template file and want to check for the existence of a particular file and if it exists, to do a few things...but can't get the syntax right. Maybe not possible like this? Quote Link to comment https://forums.phpfreaks.com/topic/182099-concatenate-in-function-parameter-allowed/ Share on other sites More sharing options...
premiso Posted November 19, 2009 Share Posted November 19, 2009 It should work if the syntax was correct, try this: if(file_exists(func1(parameter).'/images/'.func2(parameter))) { As long as the functions return a string, I can see no reason for that not to work, unless I am mistaken. Quote Link to comment https://forums.phpfreaks.com/topic/182099-concatenate-in-function-parameter-allowed/#findComment-960643 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.