Jump to content

Riko

New Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Riko

  • Rank
    Newbie
  1. Hello, Thank you for your quick answers. I must tell you that I am an absolute noob with php (You probably guessed that already). Could you give an example of what the code would be in 7.1 Greetings
  2. Hello, The following code is part of larger script that worked in php 5.3 //Translate string ($str) to UTF-8 from given charset function strToUtf8($str){ $chars = unpack('C*', $str); $cnt = count($chars); for($i=1;$i<=$cnt;$i++) { //echo "Char->" . $chars[$i]; $this->_charToUtf8(&$chars[$i]); //echo " utf8->" . $chars[$i] . "<br>"; } $returnstr = implode("",$chars); //echo "Return after implode() " . $returnstr; return $returnstr; } However: Under php 7.1 i get a syntax error ( syntax error, unexpected '&' in your code ) on this line: $this->_charToUtf8(&$chars[$i]); Can someone suggest changes for the code so it will work under 7.1? Thanks in advance GeeJay
×
×
  • 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.