champoi Posted November 18, 2008 Share Posted November 18, 2008 i'm trying to store string in my ftp by using php to save a php file like this: file_put_contents($path . "title.php","<?php echo \"".$title."\"; ?>"); the string stored in the $title is almost like this: • Must be familiar with Rules on Taxation-withholding • Must be highly analytical and very keen on details • Must be hardworking and able to work well under pressure but when i include the php file to echo it, it prints like this: •Must be familiar with Rules on Taxation-withholding•Must be highly analytical and very keen on details•Must be hardworking and able to work well under pressure are there ways to keep the format when echo-ing it? btw, i checked the saved file and it saves the format as is. Link to comment https://forums.phpfreaks.com/topic/133223-solved-help-string-in-file-format/ Share on other sites More sharing options...
genericnumber1 Posted November 18, 2008 Share Posted November 18, 2008 Ignoring the fact that you have php-inside-php (???) and your question is incredibly confusing... If you view-source on the web page does it look okay? if so, use nl2br() on it. Link to comment https://forums.phpfreaks.com/topic/133223-solved-help-string-in-file-format/#findComment-692888 Share on other sites More sharing options...
champoi Posted November 18, 2008 Author Share Posted November 18, 2008 wow, thnx ) really helped alot, never knew there was such thing as nl2br ) Link to comment https://forums.phpfreaks.com/topic/133223-solved-help-string-in-file-format/#findComment-692903 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.