Jump to content

POWERED BY:

Search the Community

Showing results for tags 'multidimensional'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Q&A Desenvolvimento
    • Perguntas e respostas rápidas
  • Web Development
    • HTML e CSS
    • Javascript
    • PHP
    • Ruby
    • Python
    • Java
    • .NET
    • Docker, Kubernets and other environments
    • WordPress
    • Mobile
    • Agile
    • Desenvolvimento de Games
    • Banco de Dados
    • Design and UX
    • Algoritmos & Outras Tecnologias
  • Entretenimento e uso pessoal
    • Segurança & Malwares
    • Geral
    • iMasters's pub

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Google+


Hangouts


Skype


Twitter


deviantART


Github


Flickr


LinkedIn


Pinterest


Facebook


Site Pessoal


Localização


Interesses

Found 1 result

  1. Luiz Henrique

    Como criar array multidimensional

    Olá pessoas, Como faço para criar um array multidimensional? É uma busca e os dados recebo de um arquivo json armazeno em um array usando um foreach e o strpos para verificar se a busca existe, então fiz isso: //$data é o arquivo json $array = array(); foreach($data as $key => $value){ if(strpos(...)){ $array['id'][] = $value->id; $array['nome'][] = $value->nome; $array['valor'][] = $value->valor; } } Porém isso me retorna id' => array (size=3) 0 => int 1 1 => int 2 2 => int 3 'nome' => array (size=3) 0 => string 'teste1' 1 => string 'teste2' 2 => string 'teste3' 'valor' => array (size=3) 0 => float 28 1 => float 30 2 => float 35 Mas preciso dele neste formato array (size=3) 0 => public 'id' => int 1 public 'nome' => string 'teste1' public 'valor' => float 28 1 => public 'id' => int 2 public 'nome' => string 'teste2' public 'valor' => float 30 2 => public 'id' => int 3 public 'nome' => string 'teste3' public 'valor' => float 35 E não consigo fazer de forma alguma !
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.