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 :/ Link to comment https://forums.phpfreaks.com/topic/216841-file_put_contents/ 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. Link to comment https://forums.phpfreaks.com/topic/216841-file_put_contents/#findComment-1126471 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); Link to comment https://forums.phpfreaks.com/topic/216841-file_put_contents/#findComment-1126472 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 Link to comment https://forums.phpfreaks.com/topic/216841-file_put_contents/#findComment-1126473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.