unidox Posted September 30, 2009 Share Posted September 30, 2009 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 More sharing options...
RussellReal Posted September 30, 2009 Share Posted September 30, 2009 looks like it should work >.> Link to comment https://forums.phpfreaks.com/topic/176004-function/#findComment-927419 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.