Page 1 of 1

Strange problem on reading file

Posted: Sun Oct 02, 2011 12:01 pm
by petrika
Hi everyone,
i am new to php an i have to parse a file which is defined ad follows :

<content email="some mail">
<![CDATA[<font size='24' color='#d3a91c'><b>CONTACT DETAILS</b></font>
#
<font color='#d3a91c'>If you have any questions please don’t hesitate to send us a message:</font>
]]>
</content>
I want to manipulate where at the # to insert dynamically my text retrieved from a form. i was looking php file functions in order to get # position and as a start i copy all the text to a string using
$content=file_get_contents("my file");
echo($content);
when i print it doesnt print anything. the problme is that it can read the particular text into the file,when i add other caracters in the file the methods works,as it should be.
My question is ,can one help me to manipulate my text file in order to write at the begining of # so i can populate my file without changing its structure?
Best Regards,

Re: Strange problem on reading file

Posted: Mon Oct 03, 2011 3:48 am
by petrika
Partially solved,the problem was that filegetcontents works ok but since the output is html formated i could see on web browers...
Thanks