Re: Replace punctuation in an associative array
Ezimene nimi Teine nimi <[email protected]> Wed, 8 Mar 2023 09:22:30 -0800 (PST)
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
⠀⠀⠀⠀⠀Good ⠀⠀⠀evening⠀⠀⠀⠀,⠀⠀⠀J. O. Aho⠀⠀⠀.
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀Are ⠀⠀⠀You ⠀⠀⠀rich⠀⠀ ? ⠀⠀If ⠀⠀⠀yes⠀⠀⠀,⠀⠀⠀would ⠀⠀You ⠀⠀help ⠀⠀⠀me ⠀⠀financially⠀? ⠀⠀⠀I'm ⠀⠀⠀having ⠀⠀⠀no ⠀⠀⠀job ⠀⠀momentarily⠀⠀.
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀I'd ⠀⠀⠀like ⠀⠀⠀to ⠀⠀buy ⠀⠀⠀newer ⠀⠀mobile ⠀⠀⠀phone⠀(⠀IPhone 14⠀)⠀⠀. ⠀⠀I'm ⠀⠀having ⠀⠀⠀momentarily ⠀⠀⠀old⠀⠀ IPhone 5s⠀⠀.
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀1100 ⠀⠀dollars ⠀⠀would ⠀⠀be ⠀⠀big ⠀help⠀.
⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀Stay⠀⠀ continueingly ⠀⠀⠀shining⠀⠀⠀,⠀⠀⠀J.O. Aho⠀⠀⠀!
⠀
⠀
⠀⠀⠀⠀⠀Guy⠀ from ⠀Viljandi⠀⠀(⠀⠀K⠀⠀⠀⠀⠀r⠀⠀⠀⠀⠀⠀i⠀⠀⠀⠀⠀⠀s⠀⠀⠀⠀⠀⠀t⠀⠀⠀⠀⠀j⠀⠀⠀⠀a⠀⠀⠀n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀R⠀⠀⠀⠀⠀o⠀⠀⠀⠀b⠀⠀⠀a⠀⠀⠀⠀m⠀⠀⠀⠀)
⠀
⠀
⠀
⠀
⠀
⠀
⠀⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀
⠀⠀
On Thursday, March 2, 2023 at 3:23:46 PM UTC+2, J.O. Aho wrote:
> On 3/2/23 13:44, The Doctor wrote:
>
> A wild guess, this still to do with your json, which you have asked help
> with quite often.
> > I wish to replace [[ with [
> >
> > AND
> >
> > ]] with ] in an associative array .
> Don't store objects as an array and place those arrays in an array.
>
> Create an object and place the object into the array which is part of
> your main-object.
> > How can I do this?
> If you just look at a string, string replace could work quite well to do
> this
> str_replace('[[','[',$str);