$plugins = $Server->Get('plugins');
   echo "<br /><br /><b>Plugins</b><br> ";
         foreach($plugins as $plugin) {
                 echo $plugin."<br>";
         }

That snippet above spits out a long list of plugins from a server. How can I store each plugin listed into SQL so that its stored as '$plugin[0]<br/>$plugin[1]<br/>$plugin[2]<br/>' and so on so that when I echo out somewhere its a nice list...?

Thanks in advance! :P

Instead of echo'ing, store it in a variable. You can use that in your insert query.

Thats what I'm asking, how can I store them? Its just storing 'Array'

You can use implode to turn an array into a string like this:

$plugins = implode('<br/>', $Server->Get('plugins'));
commented: Worked. perfect, thanks! +0

Thanks Ill try that now :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.