[ create a new paste ] login | about

Link: http://codepad.org/zLtMijf4    [ raw code | output | fork ]

martin@mustbebuilt.co.uk - PHP, pasted on Sep 10:
1
2
3
4
5
6
<?php
$band  = array('Guitar' => 'Johnny', 'Vocals'=> 'Stephen', 'Bass' => 'Andy', 'Drums' => 'Mike');
foreach($band as $key => $myvalues){
    echo "On {$key} we have {$myvalues} <br>";
}
?>


Output:
1
On Guitar we have Johnny <br>On Vocals we have Stephen <br>On Bass we have Andy <br>On Drums we have Mike <br>


Create a new paste based on this one


Comments: