Agold Posted April 6, 2011 Share Posted April 6, 2011 Pretty simple I would think but I'm unsure on the syntax. I have a variable, $ename. It's actually data from a form that I pass to said variable. What I want is to then in turn use this string in a mkdir() function. Something like mkdir("dir/folder/$ename/"); Obviously that doesn't work. I'd imagine I have to use some sort of . syntax. Quote Link to comment https://forums.phpfreaks.com/topic/232921-passing-a-variables-string-into-mkdir/ Share on other sites More sharing options...
Agold Posted April 7, 2011 Author Share Posted April 7, 2011 Well I figured out I could just add the file tree and variable together in a variable called $dir and then just pass that into mkdir. Fixed. Quote Link to comment https://forums.phpfreaks.com/topic/232921-passing-a-variables-string-into-mkdir/#findComment-1197977 Share on other sites More sharing options...
btherl Posted April 7, 2011 Share Posted April 7, 2011 Your syntax in your first post was correct. Quote Link to comment https://forums.phpfreaks.com/topic/232921-passing-a-variables-string-into-mkdir/#findComment-1197978 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.