Onder elkaar

Gestart doorAllard4 reacties30 weergaven

5 berichten · pagina 1 van 1

Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beste,

Ik heb de volgende code. Maar hoe kan ik de array netjes onder elkaar zetten?

print_r $result[list];


Resultaat:

Array ( [hoi] => [test] => )


Ik wil het graag zo:

hoi
test
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]list[/COLOR][COLOR= #007700]] as[/COLOR] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dank je, maar ik krijg:

[Warning: Invalid argument supplied for foreach() in /home/allard/domains/allard.s3.one2xs.com/public_html/api/includes/EmailResponders.php on line 30/code]

[code][COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ApiSettings.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Connect.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]functions.php[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]/**
 * This is a class that makes up the "Autoresponders" is set. You 
 *  can pick them up but also edit.
 *  
 */[/COLOR]

[URL="http://www.php.net/class"]class[/URL] Email_Responders
[COLOR= #007700]{[/COLOR]          
    [COLOR= #FF8000]/**
     * Standard strings, for showing the account and other functions.
     *
     */[/COLOR]              
        [URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] ShowResponders[COLOR= #007700]([/COLOR][COLOR= #0000BB]$Domain[/COLOR][COLOR= #007700])
        {[/COLOR]
                  [URL="http://www.php.net/global"]global[/URL] [COLOR= #0000BB]$sock[/COLOR][COLOR= #007700];[/COLOR] 
                  [COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]/CMD_API_EMAIL_AUTORESPONDER[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]domain[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$Domain[/COLOR][COLOR= #007700]));[/COLOR]
                  [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$sock[/COLOR][COLOR= #007700]->[/COLOR]fetch_parsed_body[COLOR= #007700]();[/COLOR]
                  
                  [URL="http://www.php.net/switch"]switch[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])
                  {
                      case ([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]error[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]):[/COLOR]
                              [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"There was something wrong with getting all email responders."[/COLOR][COLOR= #007700];[/COLOR]
                              [URL="http://www.php.net/break"]break[/URL][COLOR= #007700];
                      case ([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]error[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]):[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]list[/COLOR][COLOR= #007700]] as[/COLOR] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700];
}[/COLOR]
                             [URL="http://www.php.net/break"]break[/URL][COLOR= #007700];
                      default:[/COLOR]
                               [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"It is not possible to retrieve the responders."[/COLOR][COLOR= #007700];
                  }
                  
            }
            
    }[/COLOR]
    
[COLOR= #0000BB]$Responders[/COLOR] [COLOR= #007700]= new[/COLOR] Email_Responders[COLOR= #007700];[/COLOR]
?>[/code]
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Probeer dan eens dit

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sorry, maar dan krijg ik helemaal niks, nada, nope, een lege pagina.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren