|
Posted by Oli Filth on 09/24/06 16:38
howachen@gmail.com said the following on 24/09/2006 16:52:
> Oli Filth wrote:
>> howachen@gmail.com said the following on 22/09/2006 19:27:
>>> Consider the following program, how to make it work properly when a
>>> string contains line-feed?
>>>
>>> <?php
>>>
>>> $temp = "this is a \ntest";
>>>
>>> print serialize($temp);
>>>
>>> ?>
>> What do you mean by "work properly"?
>>
> pls ignore the above example,
>
> use the following one:
>
> $temp = array( "this is a \ntest\";1", "sdsdssd") ;
>
> print_r ( ( serialize($temp) ); // error here
>
> how to make the code `safe` for any input?
The error is due to the mismatched parentheses (you've opened 3, but
only closed 2).
P.S. It is customary to not top-post in this newsgroup. :)
--
Oli
Navigation:
[Reply to this message]
|