omerjerk
-
Posts
6 -
Joined
-
Last visited
Posts posted by omerjerk
-
-
I have a text field in a form like this ... <textarea rows="10" cols="150" name="content"></textarea>
I am using PHP to store the entered text into the MySql database ...
It is working fine but when I echo the value from the MySQL database onto the webpage , all the text comes up in a single line ...
Means if I entered 3 lines in the text area and save it to database , then by echo from they arey are not coming into three separate lines ...
How get rid of this problem ...???
-
function object2file($dir, $object) { file_put_contents(rtrim($dir, '\/') . DIRECTORY_SEPARATOR . get_class($object) . '.obj', serialize($object)); }
OK ... thanx... It worked fine now ...
And the second question is that can't it append the data .,... It is writing the whole file again deleting the previous fie ..
-
function object2file($dir, $object) { file_put_contents(rtrim($dir, '\/') . DIRECTORY_SEPARATOR . get_class($object) . '.obj', serialize($object)); }
Plz tell me how to actually use this ...
-
class omer { my data types }
$instance= new omer ;
after assigning the values to the data typed of instance , I want to write it in a file as a single entity ....
-
I want to ask that as we can write objects to a file in C++ and JAVA ..
so cav we do the same in PHP ??
If yes then please tell me ...
How To Write An Object To A File In Php ?
in PHP Coding Help
Posted
With fopen I cannot write the objects ..... :/