Scriptcase array code#
The code that adds the stuff onto the cart is the following. Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 57 Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 56 Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 55 Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 54 Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 53 Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 51 Warning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 43 QUOTEWarning: Cannot use a scalar value as an array in /home/joeystec/public_html/test/php/lib/ on line 42 Janusz forgot about "ń", and "ż" exchanged from "ź" here and there.I'm writing a simple cart script right now and for some reason when I moved it to another server I got these errors when I try to add an item to the cart. $text=mb_convert_encoding($text,'HTML-ENTITIES','UTF-8') And you can not replace, that they are in some char bytes and you broke cyrillic (or other alphabet) chars. Problem is that utf8_decode convert HTML chars for „ and other to ? or to \xA0. Next is for cyrillic alphabet, but for other must be very close. And you can not replace simple, that they can be part of 2 bytes code for a char (UTF-8 use 2 bytes). You need to make some conversion before execute utf8_decode. As example some chars (corresponding to HTML codes „, and others) are converted to "?" or "xA0" (hex value). Problem appear by different alphabet from standard latin. Use of utf8_decode was not enough for me by get page content from another site. It support both BOM-less and BOM'ed strings, (big- and little-endian byte order.) If you don't have the multibyte extension installed, here's a function to decode UTF-16 encoded strings. * Only do the slow convert if there are 8-bit characters */ original comment: "Squirrelmail contains a nice function in the sources to convert unicode to entities:" This finally helped me to do the job, thanks to Blackbit, had to modify deprecated ereg: Update Answer from okx dot oliver dot koenig at gmail dot com for PHP 5.6 since e/ modifier is depreciated Remember! File must be saved in UTF-8 coding. It still code Polish letters using UTF-16Įverything goes smooth, but it doesn't change '%u00D3','Ó' and '%u00F3','ó'. tRequestHeader('Content-Type', 'application/x-www-form-urlencoded' charset='utf-8')
Scriptcase array archive#
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting User Submitted Data Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation GUI Extensions Keyboard Shortcuts ? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search