Re: Replace punctuation in an associative array
"J.O. Aho" <[email protected]> Sun, 5 Mar 2023 01:39:04 +0100
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
On 3/5/23 00:58, The Doctor wrote: > J.O. Aho <[email protected]> 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