Re: Replace punctuation in an associative array

"J.O. Aho" <[email protected]> Sun, 5 Mar 2023 12:16:43 +0100
Newsgroups comp.lang.php
Message-ID <[email protected]>
On 3/5/23 01:52, The Doctor wrote:
> In article <[email protected]>,
> J.O. Aho <[email protected]> wrote:
>> 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.
>>
> 
> A good article can be written about this.

Great, post the link when you have written it ;)

It's about time, to write a good example that make sense without bad 
coding and then host and promote the page, not everyone is prepared to 
do that.

Sadly we see a lot of cheap cut the corner stuff out on the net, much 
for people have sample with simple structures so arrays works ok, but 
that is much based on the quality of the education they had. For example 
there is a country that spits out 2 million CS each year, many of them 
have a skills level not much than general high school students 
programing knowledge level. Should also note that there are really good 
programmers from that country too.

The main thing is that you get forward on your project.

-- 
  //Aho