bob2588 Posted October 26, 2010 Share Posted October 26, 2010 i need a little help with the code below with the file name at the end file_put_contents('/home/sambobi/public_html/bob/b_images/$id.jpg', $content); the variable $id id not working :/ Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 26, 2010 Share Posted October 26, 2010 Variables aren't interpolated in a single-quoted string. Quote Link to comment Share on other sites More sharing options...
objnoob Posted October 26, 2010 Share Posted October 26, 2010 Use double quotes when you need PHP to evaluate the string for variables file_put_contents("/home/sambobi/public_html/bob/b_images/$id.jpg", $content); Quote Link to comment Share on other sites More sharing options...
bob2588 Posted October 26, 2010 Author Share Posted October 26, 2010 thanks i just could not figure that out for some reason Quote Link to comment 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.