addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [php-49] Quick one liner to flatten an array?

From: Jd D.
Sent on: Wednesday, February 20, 2013 4:53 PM
Actually, I haven't tested it yet, but can't I do something smelly like this?

        if (! empty($header))
        {
            // Add all headers to the request
            $options = array_merge($options, array(
                CURLOPT_HTTPHEADER => array(
                  'User-Agent: '     . self::USER_AGENT,
                  'Authorization: '    . print_r($header, 1),
                ),
            ));
        }



On Wed, Feb 20, 2013 at 4:50 PM, Jd Daniel <[address removed]> wrote:

just looking for a simple solution that I can put direct in a curlopt field,
maybe a lambda or something?

$arr = array('foo' => 'bar',);

echo magic_function($arr); // foo bar

Anyone done this before and have a quick answer?

--
Jd Daniel || ERADO
Senior Applications Architect
7901 Delridge Way SW #36D, Seattle
C.    [masked]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jd Daniel ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Jd Daniel, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
Jd Daniel || ERADO
Senior Applications Architect
7901 Delridge Way SW #36D, Seattle
C.   [masked]

Our Sponsors

  • PluralSight

    PluralSight subscriptions for developer training

  • O'Reilly

    Disc Code: PCBW is good for 40% off print and 50% off ebooks and videos

  • JetBrains PhpStorm

    Occasional free licenses to raffle off at meetups

  • DynaTrace

    Find yourself, promote yourself, stay true to yourself.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy