Jump to content

[SOLVED] PHP explode from MySQLi


PHPfolife

Recommended Posts

Hello,

 

I am trying to explode with php the field from the DB but every time i try to I just get the text Array.

 

$q = "SELECT id,name FROM kb_names WHERE id = '$catId'";
$r = $mysqli->query($q);
$row = $r->fetch_object();
echo $row->name;

 

This echoes out one,two,three. Now when i try to explode the comma from that, I did this:

 

$links = $row->links;
echo $links;
$pieces = explode(",", $links);
echo $pieces;

 

But then this part just displays Array. I don't know why and I have searched and I am getting nothing.

 

Any idea?  :confused:

 

Thanks in advanced

Link to comment
https://forums.phpfreaks.com/topic/174778-solved-php-explode-from-mysqli/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.