views:

52

answers:

1

Hi,

I am using cakephp 1.2. I am using httpsocket get method. It works well. But the content is enclosed by quotes..

string(123) "..this is where the content is".

I think it is telling the type of response and the number of characters of the output. I have my application in production setup.

How can i remove it.

I appreciate any help.

Thanks.

+1  A: 

It sounds like a var_dump is being done on the other end.

Either or, this should pull out the text.

preg_match('~"(.*)"~s', $string, $matches);

if (!empty($matches)) {
    $returned  = $matches[1];
}

echo $returned; 

Hopefully my regex isn't horrible.

Brad F Jacobs