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? 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. 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
Archived
This topic is now archived and is closed to further replies.