PDA

View Full Version : array in mysql


wolfe
28 Dec 2007, 14:11
i cant get this array to work



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



it returns nothing except this error

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Opserty
28 Dec 2007, 14:20
$array is not an array, its just a string. You don't need to implode it.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



But in your example you don't need to implode it because the numbers are already seperated by commas. So just change implode(",", $array) to $array.

wolfe
28 Dec 2007, 17:45
m8 thats not what i needed i need it to only show threads that are in them forumids ?

Lynne
28 Dec 2007, 17:47
I think he told you what you need to do:
m8 thats not what i needed i need it to only show threads that are in them forumids ?
$array is not an array, its just a string. You don't need to implode it.

So just change implode(",", $array) to $array.

wolfe
28 Dec 2007, 17:47
nevermind m8 that worked gr8 thx :P