Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Replace punctuation in an associative array Date: Sun, 5 Mar 2023 01:39:04 +0100 Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net GOeVq9zS/IHuxACF9tMXEQWRoU1g8SdXI6U5dRByrz5t1CM2Lu Cancel-Lock: sha1:kczOuykFqUS/4wNvXoIarle0AEw= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US-large In-Reply-To: Xref: csiph.com comp.lang.php:19369 On 3/5/23 00:58, The Doctor wrote: > J.O. Aho wrote: > : https://pastebin.com/bF6bZseu > : Keep in mind nothin is a 100% solution for your issue as I haven't > : bothered really go into the API that is used but just a bit based on > : your posts in this group. > > : And please, what ever you do, don't go with the str_replace, it's not > : the solution to your issue, it will just make things a lot harder to > : maintain. > > > Actually the class approach works better. That's good, just tweak it to fit your user case, just don't forget validate the input data. > Too bad Google does not pick that up > in their searches for JSON> Much depends on the requirements and what the json is used for, say sending data between angular and php, then the coder is usually in control of both front end and backend and can use what ever json format they want, but it's different when you have to follow an API, but usually you can get support from the API owner and payment services tend to also do a verification round before letting you to use production grade transactions. -- //Aho