Jump to content

Function


unidox

Recommended Posts

I have this function:

 

        private function getLong(&$string)
        {
            $data = substr($string, 0, 4);
            $string = substr($string, 4);
            $data = unpack('Vvalue', $data);
            return $data['value'];
        }

 

But I am getting the error: Warning: unpack() [function.unpack]: Type V: not enough input, need 4, have 0

 

The error line is $data = unpack('Vvalue', $data);

 

Whats wrong?

Link to comment
https://forums.phpfreaks.com/topic/176004-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.